Skip to content

Commit

Permalink
webapp/database.py: show message on eve.json loading error
Browse files Browse the repository at this point in the history
  • Loading branch information
aiooss-anssi committed Jan 16, 2024
1 parent 47dcdef commit 49fd2b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ async def fill_database(self):
break
try:
await load_event(self.con, line)
except (AttributeError, aiosqlite.OperationalError):
except (AttributeError, aiosqlite.OperationalError) as e:
print(f"Partial or malformed eve.json, retrying: {e}", flush=True)
break # eve.json ends with a partial JSON
eve_idx += len(line)
line_count += 1
Expand Down

0 comments on commit 49fd2b7

Please sign in to comment.