All pastes #155091 Raw Edit

Someone

public text v1 · immutable
#155091 ·published 2006-08-30 20:41 UTC
rendered paste body
? Patches
? beagle-chat.patch
? buttonui-fix-history-warn.patch
? check-reqs+beagle.patch
? deskbar-applet-2.15.3
? evolution-test-module-import.patch
? selection.patch
? selection2.patch
? treeview-theming.patch
? data/deskbar-applet.desktop
? deskbar/DeskbarWindow.py
? deskbar/DeskbarWindowPreferences.py
? deskbar/deskbar-applet-alt.py
? deskbar/ui/window/CuemiacWindowUI.pyc
? deskbar/ui/window/__init__.pyc
? deskbar/updater/ErrorDialog.pyc
? deskbar/updater/Makefile
? deskbar/updater/Makefile.in
? deskbar/updater/NewStuffUpdater.pyc
? deskbar/updater/ProgressbarDialog.pyc
? deskbar/updater/__init__.pyc
? deskbar/updater/org.gnome.NewStuffManager.service
? deskbar/updater/specs/Makefile
? deskbar/updater/specs/Makefile.in
Index: deskbar/handlers/evolution.py
===================================================================
RCS file: /cvs/gnome/deskbar-applet/deskbar/handlers/evolution.py,v
retrieving revision 1.22
diff -u -r1.22 evolution.py
--- deskbar/handlers/evolution.py	8 Jul 2006 08:21:07 -0000	1.22
+++ deskbar/handlers/evolution.py	30 Aug 2006 20:37:49 -0000
@@ -1,10 +1,21 @@
 from gettext import gettext as _
 import cgi
 import gnomevfs
-import deskbar, deskbar.Indexer, deskbar.Handler, deskbar.evolution, deskbar.Utils, deskbar.Match
+import deskbar, deskbar.Indexer, deskbar.Handler, deskbar.Utils, deskbar.Match
 from deskbar.defs import VERSION
 
+try:
+	import deskbar.evolution
+except:
+	# We handle error in _check_requirements
+	pass
+
 def _check_requirements():
+	try:
+		import deskbar.evolution
+	except Exception, e:
+		return (deskbar.Handler.HANDLER_IS_NOT_APPLICABLE, "Could not load evolution module: "+str(e), None)
+		
 	if deskbar.evolution.num_address_books_with_completion() > 0:
 		return (deskbar.Handler.HANDLER_IS_HAPPY, None, None)
 	else: