Skip to content

Commit

Permalink
Handle notification exception in display buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
andreztz committed Jun 22, 2024
1 parent 46113f4 commit f4a2fe4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xradios/tui/buffers/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ def update(self, metadata):
song = metadata.get('song')

if song:
content = f'\n{name:<30} {homepage}\n\n{song}'
notification(name, message=song, app_name='xradios', timeout=5000)
content = f"\n{name:<30} {homepage}\n\n{song}"
try:
notification(name, message=song, app_name="xradios", timeout=5000)
except Exception:
pass
# TODO: log exception to text file
else:
content = f'\n{name:<30}\n\n{homepage}'

Expand Down

0 comments on commit f4a2fe4

Please sign in to comment.