diff options
author | bors-servo <infra@servo.org> | 2023-04-17 11:09:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 11:09:22 +0200 |
commit | 0acc345ae727f51b3eabd878ad52461a34e37cd5 (patch) | |
tree | bc44ecc2e3e67cb8603c2af317cb7157aeab8ec7 /python/servo | |
parent | 6e2615f0b5cf36b54bbada88e8e5317da764108a (diff) | |
parent | 61a70fbff2969eedc3efc1fc6c9bc8f73cdb0bc5 (diff) | |
download | servo-0acc345ae727f51b3eabd878ad52461a34e37cd5.tar.gz servo-0acc345ae727f51b3eabd878ad52461a34e37cd5.zip |
Auto merge of #29638 - mrobinson:fix-notify, r=mukilan
Make errors during build status notification warnings
Instead of raising an exception, simply print a warning on stderr when notification fails.
Fixes #29635.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #29635
- [x] These changes do not require tests because they fix a minor tools issue.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'python/servo')
-rw-r--r-- | python/servo/build_commands.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index c0c62fb2d1a..2b0624d3a1d 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -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) |