From 9c3929f15eab4f52ab840cbe73bb0535247ccbd4 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sat, 24 Nov 2007 22:46:43 +0000 Subject: [PATCH] dont die if plugin in prefs.state is not found on the filesystem --- src/plugins.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins.py b/src/plugins.py index 468fc6072..b486b1c6d 100644 --- a/src/plugins.py +++ b/src/plugins.py @@ -61,9 +61,13 @@ class PluginManager: mod = __import__(modname, globals(), locals(), ['']) if 'deluge_init' in dir(mod): if modname != "TorrentPieces": - print "Initialising plugin",modname - mod.deluge_init(path) - self.available_plugins[mod.plugin_name] = mod + print "Initialising plugin", modname + try: + mod.deluge_init(path) + except: + print "Cant init plugin", modname + else: + self.available_plugins[mod.plugin_name] = mod def get_available_plugins(self): return self.available_plugins.keys()