Commit 3026a561 authored by Ad Schellevis's avatar Ad Schellevis

(ids) ignore json parse errors in eve log file

parent 129def90
......@@ -50,7 +50,10 @@ if __name__ == '__main__':
# try to find actual timestamp from file
for line in reverse_log_reader(filename=filename):
if line['line'] != '':
record = ujson.loads(line['line'])
try:
record = ujson.loads(line['line'])
except ValueError:
continue
if 'timestamp' in record:
row['modified'] = int(time.mktime(datetime.datetime.strptime(record['timestamp'].split('.')[0],
"%Y-%m-%dT%H:%M:%S").timetuple()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment