#NEWLINE# @ staticmethod #NEWLINE# def notify_osx_call( title , message , sound , fallback ) : #NEWLINE# #INDENT# 'OSX notifications.' #NEWLINE# try : #NEWLINE# #INDENT# assert ( ( Options . terminal_notifier is not None ) and exists ( Options . terminal_notifier ) ) #NEWLINE# params = [ Options . terminal_notifier , '-title' , Options . app_name ] #NEWLINE# if ( message is not None ) : #NEWLINE# #INDENT# params += [ '-message' , message ] #NEWLINE# #UNINDENT# if ( title is not None ) : #NEWLINE# #INDENT# params += [ '-subtitle' , title ] #NEWLINE# #UNINDENT# if ( Options . sender is not None ) : #NEWLINE# #INDENT# params += [ '-sender' , Options . sender ] #NEWLINE# params += [ '-activate' , Options . sender ] #NEWLINE# #UNINDENT# if sound : #NEWLINE# #INDENT# params += [ '-sound' , 'Glass' ] #NEWLINE# #UNINDENT# subprocess . call ( params ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# print ( traceback . format_exc ( ) ) #NEWLINE# fallback ( title , message , sound )