Log files with invalid JSON
This commit is contained in:
parent
d3ac6703c6
commit
9a84e191be
|
@ -42,6 +42,9 @@ class LTS:
|
||||||
fcntl.flock(fh, fcntl.LOCK_EX)
|
fcntl.flock(fh, fcntl.LOCK_EX)
|
||||||
json.dump({"description": self.description, "data": self.data}, fh)
|
json.dump({"description": self.description, "data": self.data}, fh)
|
||||||
self.rebuild_index()
|
self.rebuild_index()
|
||||||
|
except json.decoder.JSONDecodeError as e:
|
||||||
|
log.exception(f"Cannot decode JSON in {self.filename}: {e}")
|
||||||
|
raise
|
||||||
|
|
||||||
def pop(self, i):
|
def pop(self, i):
|
||||||
# Pop the element at index i and adjust the min/max values of the
|
# Pop the element at index i and adjust the min/max values of the
|
||||||
|
|
Loading…
Reference in New Issue