allow import of ConfigLists from non Screens. positions.
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 8 Jul 2008 11:20:39 +0000 (11:20 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 8 Jul 2008 11:20:39 +0000 (11:20 +0000)
example:
<config screen="Plugins.Systemplugins.Foo" module="Bar" args="1" type="ConfigList" />

lib/python/Screens/Wizard.py

index 855df6ad16cbd9c368f4a4c677c03939b91f3442..ab1f188b21430b2da4056623b261bb7e2840835a 100644 (file)
@@ -105,7 +105,10 @@ class Wizard(Screen, HelpableScreen):
                                type = str(attrs.get('type'))
                                self.wizard[self.lastStep]["config"]["type"] = type
                                if type == "ConfigList" or type == "standalone":
                                type = str(attrs.get('type'))
                                self.wizard[self.lastStep]["config"]["type"] = type
                                if type == "ConfigList" or type == "standalone":
-                                       exec "from Screens." + str(attrs.get('module')) + " import *"
+                                       try:
+                                               exec "from Screens." + str(attrs.get('module')) + " import *"
+                                       except:
+                                               exec "from " + str(attrs.get('module')) + " import *"
                                
                                        self.wizard[self.lastStep]["config"]["screen"] = eval(str(attrs.get('screen')))
                                        if (attrs.has_key('args')):
                                
                                        self.wizard[self.lastStep]["config"]["screen"] = eval(str(attrs.get('screen')))
                                        if (attrs.has_key('args')):