Fixed error report in mailing list by Peter 2011-03-30
svn: r16990
This commit is contained in:
parent
8440811fb8
commit
29f0513b49
@ -151,17 +151,20 @@ def make_requested_gramplet(gui_class, pane, opts, dbstate, uistate):
|
|||||||
"""
|
"""
|
||||||
Make a GUI gramplet given its name.
|
Make a GUI gramplet given its name.
|
||||||
"""
|
"""
|
||||||
name = opts["name"]
|
if "name" in opts:
|
||||||
if name in AVAILABLE_GRAMPLETS():
|
name = opts["name"]
|
||||||
gui = gui_class(pane, dbstate, uistate, **opts)
|
if name in AVAILABLE_GRAMPLETS():
|
||||||
if opts.get("content", None):
|
gui = gui_class(pane, dbstate, uistate, **opts)
|
||||||
pdata = PLUGMAN.get_plugin(name)
|
if opts.get("content", None):
|
||||||
module = PLUGMAN.load_plugin(pdata)
|
pdata = PLUGMAN.get_plugin(name)
|
||||||
if module:
|
module = PLUGMAN.load_plugin(pdata)
|
||||||
getattr(module, opts["content"])(gui)
|
if module:
|
||||||
else:
|
getattr(module, opts["content"])(gui)
|
||||||
print "Error loading gramplet '%s': skipping content" % name
|
else:
|
||||||
return gui
|
print "Error loading gramplet '%s': skipping content" % name
|
||||||
|
return gui
|
||||||
|
else:
|
||||||
|
print "Error loading gramplet '%s': unknown name" % name
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def logical_true(value):
|
def logical_true(value):
|
||||||
|
Loading…
Reference in New Issue
Block a user