From ef8359df4b78d606aa32634a8d4f21cbd960f095 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 20 Apr 2023 12:06:05 +0200 Subject: 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. --- python/servo/build_commands.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'python') 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 -- cgit v1.2.3