servo: Merge #8024 - Add clarity to warning message about OS X notifications (from tareqak:warning_message_about_os_x_notifications_is_unclear); r=frewsxcv
authorTareq A Khandaker <tareqakhandaker@gmail.com>
Wed, 14 Oct 2015 19:29:54 -0600
changeset 337344 4a2bed81655c2b416dccb827f2ade86ee70fc20c
parent 337343 61e59f2f49c5ec71dace1cdb31bd851e288a000c
child 337345 ce7c345d0bc33845c44b36a5e900c4abbea15f94
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrewsxcv
servo: Merge #8024 - Add clarity to warning message about OS X notifications (from tareqak:warning_message_about_os_x_notifications_is_unclear); r=frewsxcv I made this change with respect to this issue: https://github.com/servo/servo/issues/7840 Source-Repo: https://github.com/servo/servo Source-Revision: f8ada66919c8fda836b8e33375e82c1ef9059999
servo/python/servo/build_commands.py
--- a/servo/python/servo/build_commands.py
+++ b/servo/python/servo/build_commands.py
@@ -32,17 +32,17 @@ def is_headless_build():
 def notify_linux(title, text):
     try:
         import dbus
         bus = dbus.SessionBus()
         notify_obj = bus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
         method = notify_obj.get_dbus_method("Notify", "org.freedesktop.Notifications")
         method(title, 0, "", text, "", [], {"transient": True}, -1)
     except:
-        raise Exception("Please make sure that the Python dbus module is installed!")
+        raise Exception("Optional Python module 'dbus' is not installed.")
 
 
 def notify_win(title, text):
     from ctypes import Structure, windll, POINTER, sizeof
     from ctypes.wintypes import DWORD, HANDLE, WINFUNCTYPE, BOOL, UINT
 
     class FLASHWINDOW(Structure):
         _fields_ = [("cbSize", UINT),
@@ -77,17 +77,17 @@ def notify_darwin(title, text):
         note.setInformativeText_(text)
 
         now = Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date())
         note.setDeliveryDate_(now)
 
         centre = Foundation.NSUserNotificationCenter.defaultUserNotificationCenter()
         centre.scheduleNotification_(note)
     except ImportError:
-        raise Exception("Please make sure that the Python pyobjc module is installed!")
+        raise Exception("Optional Python module 'pyobjc' is not installed.")
 
 
 def notify_build_done(elapsed):
     """Generate desktop notification when build is complete and the
     elapsed build time was longer than 30 seconds."""
     if elapsed > 30:
         notify("Servo build", "Completed in %0.2fs" % elapsed)