Skip to content

Commit

Permalink
Handle all exceptions instead of JSONDecode ones #9
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-mironov committed Nov 18, 2022
1 parent e527b10 commit e055c46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/dongleman_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ async def _handle():
print(f'Processing path {path}')
try:
await send_telegram_message(client, json_load(f))
except JSONDecodeError as err:
print(f"Error parsing JSON '{path}': {err}")
except Exception as err:
print(f"Exception while processing JSON '{path}': {err}")

await _handle()
with Inotify(blocking=False) as n:
Expand Down

0 comments on commit e055c46

Please sign in to comment.