quteproc: except ValueError

There is no json.decoder.JSONDecodeError, it was a lie all along...
This commit is contained in:
Daniel Schadt 2016-05-25 13:26:32 +02:00
parent 49419bc429
commit cf3930f925

View File

@ -71,7 +71,7 @@ class LogLine(testprocess.Line):
super().__init__(data)
try:
line = json.loads(data)
except json.decoder.JSONDecodeError:
except ValueError:
raise testprocess.InvalidLine(data)
self.timestamp = datetime.datetime.fromtimestamp(line['created'])