quteproc: except ValueError
There is no json.decoder.JSONDecodeError, it was a lie all along...
This commit is contained in:
parent
49419bc429
commit
cf3930f925
@ -71,7 +71,7 @@ class LogLine(testprocess.Line):
|
|||||||
super().__init__(data)
|
super().__init__(data)
|
||||||
try:
|
try:
|
||||||
line = json.loads(data)
|
line = json.loads(data)
|
||||||
except json.decoder.JSONDecodeError:
|
except ValueError:
|
||||||
raise testprocess.InvalidLine(data)
|
raise testprocess.InvalidLine(data)
|
||||||
|
|
||||||
self.timestamp = datetime.datetime.fromtimestamp(line['created'])
|
self.timestamp = datetime.datetime.fromtimestamp(line['created'])
|
||||||
|
Loading…
Reference in New Issue
Block a user