Catch more exceptions when delivering build notifications

It seems that catching ImportError isn't enough, so we must catch any
type of exception when trying to deliver a build notification.

Fixes #29645.
This commit is contained in:
Martin Robinson 2023-04-20 12:06:05 +02:00
parent 9acb9cc5cf
commit ef8359df4b

View file

@ -743,9 +743,8 @@ class MachCommands(CommandBase):
{"transient": True}, # hints
-1 # timeout
)
except ImportError:
print("[Warning] Could not generate notification: "
"Optional Python module 'dbus' is not installed.",
except Exception as exception:
print(f"[Warning] Could not generate notification: {exception}",
file=sys.stderr)
return True