Author: dmeyer
Date: Mon Oct 29 13:51:24 2007
New Revision: 2891
Log:
we only support nf_generic and nf_gtk
Modified:
trunk/base/src/notifier/nf_wrapper.py
Modified: trunk/base/src/notifier/nf_wrapper.py
==============================================================================
--- trunk/base/src/notifier/nf_wrapper.py (original)
+++ trunk/base/src/notifier/nf_wrapper.py Mon Oct 29 13:51:24 2007
@@ -169,19 +169,18 @@
import pynotifier as notifier
# find a good main loop
- if not module and sys.modules.has_key('gtk'):
- # The gtk module is loaded, this means that we will hook
- # ourself into the gtk main loop
- module = 'gtk'
- elif not module:
- # use generic
+ if not module:
module = 'generic'
-
- if getattr(notifier, module.upper()) is not None:
- # use the selected module
- notifier.init(getattr(notifier, module.upper()), **options)
- elif module:
- raise AttributeError('no notifier module %s' % module)
+ if sys.modules.has_key('gtk'):
+ # The gtk module is loaded, this means that we will hook
+ # ourself into the gtk main loop
+ module = 'gtk'
+
+ if not module in ( 'generic', 'gtk'):
+ raise AttributeError('unsupported notifier %s' % module)
+
+ # use the selected module
+ notifier.init(getattr(notifier, module.upper()), **options)
# delete basic notifier handler
log = logging.getLogger('notifier')
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog