aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-05-12 22:08:25 -0500
committerbors-servo <metajack+bors@gmail.com>2015-05-12 22:08:25 -0500
commitb3b9deafa7ed87bd0649849f3aa729f21c4ff45d (patch)
treee3eba50b64d92dd3086e30984b93872227cadd58 /python
parente7db42f93125a8b2f9122ed34402d652ea6b2ff3 (diff)
parentc16024871776604e668a3275330ae63ab6745ba4 (diff)
downloadservo-b3b9deafa7ed87bd0649849f3aa729f21c4ff45d.tar.gz
servo-b3b9deafa7ed87bd0649849f3aa729f21c4ff45d.zip
Auto merge of #6029 - andars:master, r=jdm
Closes #5582 Uses `terminal-notifier` to generate notifications on mac. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6029) <!-- Reviewable:end -->
Diffstat (limited to 'python')
-rw-r--r--python/servo/build_commands.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index 5b4e46f9e8a..5d5da3298fe 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -55,8 +55,15 @@ def notify(elapsed):
print("[Warning] Could not generate notification! Please make sure that the required libraries are installed!")
elif sys.platform.startswith('darwin'):
- # Notification code for Darwin here! For the time being printing simple msg
- print("[Warning] : Darwin System! Notifications not supported currently!")
+ try:
+ from distutils.spawn import find_executable
+ notifier = find_executable('terminal-notifier')
+ if not notifier:
+ raise Exception('`terminal-notifier` not found')
+ subprocess.call([notifier, '-title', 'Servo Build System',
+ '-group', 'servobuild', '-message', 'Servo build complete!'])
+ except:
+ print("[Warning] Could not generate notification! Make sure that `terminal-notifier is installed!")
@CommandProvider