 from dbus . exceptions import DBusException <EOL> try : <EOL> from gi . repository import Notify <EOL> except ImportError : <EOL> from scudcloud import notify2 <EOL> Notify = None <EOL> class Notifier ( object ) : <EOL> def __init__ ( self , app_name , icon ) : <EOL> self . icon = icon <EOL> try : <EOL> if Notify is not None : <EOL> Notify . init ( app_name ) <EOL> self . notifier = Notify <EOL> else : <EOL> notify2 . init ( app_name ) <EOL> self . notifier = notify2 <EOL> self . enabled = True <EOL> except DBusException : 
 print ( "<STR_LIT>" 
 from dbus . exceptions import DBusException <EOL> try : <EOL> from gi . repository import Notify <EOL> except ImportError : <EOL> from scudcloud import notify2 <EOL> Notify = None <EOL> class Notifier ( object ) : <EOL> def __init__ ( self , app_name , icon ) : <EOL> self . icon = icon <EOL> try : <EOL> if Notify is not None : <EOL> Notify . init ( app_name ) <EOL> self . notifier = Notify <EOL> else : <EOL> notify2 . init ( app_name ) <EOL> self . notifier = notify2 <EOL> self . enabled = True <EOL> except DBusException : <EOL> print ( "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> self . enabled = False <EOL> def notify ( self , title , message , icon = None ) : <EOL> if not self . enabled : <EOL> return <EOL> if icon is None : <EOL> icon = self . icon <EOL> if Notify is not None : <EOL> notice = self . notifier . Notification . new ( title , message , icon ) <EOL> else : <EOL> notice = notify2 . Notification ( title , message , icon ) <EOL> notice . set_hint_string ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> notice . show ( ) </s>
