deskbar-applet r2039 - in trunk: . deskbar/core deskbar/ui
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2039 - in trunk: . deskbar/core deskbar/ui
- Date: Fri, 21 Mar 2008 13:50:10 +0000 (GMT)
Author: sebp
Date: Fri Mar 21 13:50:10 2008
New Revision: 2039
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2039&view=rev
Log:
Removed notification about usage of modules using old API (didn't work good anyway)
Modified:
trunk/ChangeLog
trunk/deskbar/core/ModuleLoader.py
trunk/deskbar/ui/DeskbarTray.py
Modified: trunk/deskbar/core/ModuleLoader.py
==============================================================================
--- trunk/deskbar/core/ModuleLoader.py (original)
+++ trunk/deskbar/core/ModuleLoader.py Fri Mar 21 13:50:10 2008
@@ -7,7 +7,6 @@
import logging
import os
import pydoc
-import traceback
LOGGER = logging.getLogger(__name__)
@@ -52,7 +51,6 @@
self.ext = extension
self.watcher = DirWatcher()
self.watch_id = self.watcher.connect('changed', self._on_handler_file_changed)
- self.__old_modules = []
if (dirs):
self.dirs = [abspath(expanduser(s)) for s in dirs]
@@ -62,9 +60,6 @@
self.dirs = None
self.filelist = []
- def get_old_modules(self):
- return self.__old_modules
-
def _on_handler_file_changed(self, watcher, f):
if f in self.filelist or not self.is_module(f):
return
@@ -100,14 +95,9 @@
Primarily for internal use."""
try:
mod = pydoc.importfile (filename)
- except Exception:
+ except Exception, e:
LOGGER.error("Error loading the file: %s.", filename)
- error = traceback.format_exc()
- if "No module named deskbar.Handler" in error:
- self.__old_modules.append(filename)
- else:
- print error
- return
+ LOGGER.exception(e)
try:
if (mod.HANDLERS): pass
Modified: trunk/deskbar/ui/DeskbarTray.py
==============================================================================
--- trunk/deskbar/ui/DeskbarTray.py (original)
+++ trunk/deskbar/ui/DeskbarTray.py Fri Mar 21 13:50:10 2008
@@ -106,18 +106,6 @@
])
def __on_loaded(self, sender):
- old_modules = self.__core.get_old_modules()
- if len(old_modules) > 0:
- msg = _("Some potentially old modules that make use of an old Deskbar-Applet API have been found. Remove these files for this warning to disappear.\n")
- for mod in old_modules:
- msg += "\n"+mod
- dialog = gtk.MessageDialog(parent=None,
- flags=0,
- type=gtk.MESSAGE_WARNING,
- buttons=gtk.BUTTONS_OK,
- message_format=msg)
- dialog.connect('response', lambda w, id: dialog.destroy())
- dialog.show_all()
self.set_sensitive(True)
self.__view.set_sensitive(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]