Merge pull request #460 from pikers/fnf_notify-send
Fix crash on notification daemon not foundbackend_spec
commit
71b2f24a2e
|
@ -83,6 +83,7 @@ async def notify_from_ems_status_msg(
|
||||||
f'unix:path=/run/user/{_dbus_uid}/bus'
|
f'unix:path=/run/user/{_dbus_uid}/bus'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
result = await trio.run_process(
|
result = await trio.run_process(
|
||||||
[
|
[
|
||||||
'notify-send',
|
'notify-send',
|
||||||
|
@ -99,6 +100,9 @@ async def notify_from_ems_status_msg(
|
||||||
check=False,
|
check=False,
|
||||||
)
|
)
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
log.warn(f'No notification daemon installed stderr: {result.stderr}')
|
log.warn(f'Notification daemon crashed stderr: {result.stderr}')
|
||||||
|
|
||||||
log.runtime(result)
|
log.runtime(result)
|
||||||
|
|
||||||
|
except FileNotFoundError:
|
||||||
|
log.warn('Tried to send a notification but \'notify-send\' not present')
|
||||||
|
|
Loading…
Reference in New Issue