diff options
author | bors-servo <infra@servo.org> | 2023-04-23 21:58:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-23 21:58:30 +0200 |
commit | 1b4fdcf7bcd4a7671a10b9f53e11f23fe8b512f2 (patch) | |
tree | 6d1a1c2cf5b91a1cac40c5d9642193743c96842d /python | |
parent | 0b888c86442f0e2efaf440842517f0912c9f10ef (diff) | |
parent | ef8359df4b78d606aa32634a8d4f21cbd960f095 (diff) | |
download | servo-1b4fdcf7bcd4a7671a10b9f53e11f23fe8b512f2.tar.gz servo-1b4fdcf7bcd4a7671a10b9f53e11f23fe8b512f2.zip |
Auto merge of #29647 - mrobinson:catch-more-notification-exceptions, r=jdm
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.
<!-- 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 do not require tests because they fix a small build infrastructure 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')
-rw-r--r-- | python/servo/build_commands.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 2b0624d3a1d..135a48ef7ed 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -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 |