mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
mach: fix crash when sending notifications on Windows Server 2019 (#32352)
This commit is contained in:
parent
14286d913d
commit
ff166ea1e3
1 changed files with 9 additions and 6 deletions
|
@ -256,12 +256,15 @@ class MachCommands(CommandBase):
|
||||||
print("[Warning] Could not generate notification: "
|
print("[Warning] Could not generate notification: "
|
||||||
f"Could not run '{notify_command}'.", file=sys.stderr)
|
f"Could not run '{notify_command}'.", file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
notifier = LinuxNotifier if sys.platform.startswith("linux") else None
|
try:
|
||||||
notification = notifypy.Notify(use_custom_notifier=notifier)
|
notifier = LinuxNotifier if sys.platform.startswith("linux") else None
|
||||||
notification.title = title
|
notification = notifypy.Notify(use_custom_notifier=notifier)
|
||||||
notification.message = message
|
notification.title = title
|
||||||
notification.icon = path.join(self.get_top_dir(), "resources", "servo_64.png")
|
notification.message = message
|
||||||
notification.send(block=False)
|
notification.icon = path.join(self.get_top_dir(), "resources", "servo_64.png")
|
||||||
|
notification.send(block=False)
|
||||||
|
except notifypy.exceptions.UnsupportedPlatform as e:
|
||||||
|
print(f"[Warning] Could not generate notification: {e}", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
def otool(s):
|
def otool(s):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue