notify_darwin should trap import errors and provide the useful package name for the user to install.

This commit is contained in:
Michael Tremel 2015-06-27 17:13:36 -07:00
parent 46709edaf8
commit bb426d3575

View file

@ -64,6 +64,7 @@ def notify_win(title, text):
def notify_darwin(title, text):
try:
import Foundation
import objc
@ -79,6 +80,8 @@ def notify_darwin(title, text):
centre = NSUserNotificationCenter.defaultUserNotificationCenter()
centre.scheduleNotification_(note)
except ImportError:
raise Exception("Please make sure that the Python pyobjc module is installed!")
def notify_build_done(elapsed):