mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
Make errors during build status notification warnings
Instead of raising an exception, simply print a warning on stderr when notification fails. Fixes #29635.
This commit is contained in:
parent
6e2615f0b5
commit
61a70fbff2
1 changed files with 5 additions and 2 deletions
|
@ -744,12 +744,15 @@ class MachCommands(CommandBase):
|
|||
-1 # timeout
|
||||
)
|
||||
except ImportError:
|
||||
raise Exception("Optional Python module 'dbus' is not installed.")
|
||||
print("[Warning] Could not generate notification: "
|
||||
"Optional Python module 'dbus' is not installed.",
|
||||
file=sys.stderr)
|
||||
return True
|
||||
|
||||
if notify_command:
|
||||
if call([notify_command, title, message]) != 0:
|
||||
raise Exception("Could not run '%s'." % notify_command)
|
||||
print("[Warning] Could not generate notification: "
|
||||
f"Could not run '{notify_command}'.", file=sys.stderr)
|
||||
else:
|
||||
notifier = LinuxNotifier if sys.platform.startswith("linux") else None
|
||||
notification = notifypy.Notify(use_custom_notifier=notifier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue