Better error resilience against garbage history data from plugins
See #1805
This commit is contained in:
parent
01cffafe77
commit
ab42cc2a7f
1 changed files with 8 additions and 0 deletions
|
|
@ -982,7 +982,15 @@ class LocalFileStorage(StorageInterface):
|
|||
continue
|
||||
|
||||
printer_profile = history_entry["printerProfile"]
|
||||
if not printer_profile:
|
||||
continue
|
||||
|
||||
print_time = history_entry["printTime"]
|
||||
try:
|
||||
print_time = float(print_time)
|
||||
except:
|
||||
self._logger.warn("Invalid print time value found in print history for {} in {}/.metadata.yaml: {!r}".format(name, path, print_time))
|
||||
continue
|
||||
|
||||
if not printer_profile in former_print_times:
|
||||
former_print_times[printer_profile] = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue