Author: andar

Revision: 5858

Log:
        Fix possible exception when trying to load pre-1.2 plugins

Diff:
Modified: branches/1.2_RC/deluge/pluginmanagerbase.py
===================================================================
--- branches/1.2_RC/deluge/pluginmanagerbase.py 2009-10-23 01:07:46 UTC (rev 
5857)
+++ branches/1.2_RC/deluge/pluginmanagerbase.py 2009-10-23 01:15:30 UTC (rev 
5858)
@@ -131,8 +131,8 @@
         egg.activate()
         for name in egg.get_entry_map(self.entry_name):
             entry_point = egg.get_entry_info(self.entry_name, name)
-            cls = entry_point.load()
             try:
+                cls = entry_point.load()
                 instance = cls(plugin_name.replace("-", "_"))
             except Exception, e:
                 log.error("Unable to instantiate plugin!")

Modified: trunk/deluge/pluginmanagerbase.py
===================================================================
--- trunk/deluge/pluginmanagerbase.py   2009-10-23 01:07:46 UTC (rev 5857)
+++ trunk/deluge/pluginmanagerbase.py   2009-10-23 01:15:30 UTC (rev 5858)
@@ -131,8 +131,8 @@
         egg.activate()
         for name in egg.get_entry_map(self.entry_name):
             entry_point = egg.get_entry_info(self.entry_name, name)
-            cls = entry_point.load()
             try:
+                cls = entry_point.load()
                 instance = cls(plugin_name.replace("-", "_"))
             except Exception, e:
                 log.error("Unable to instantiate plugin!")



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to