From eff00c25f5f71f0f7deb4443bded990202199f8f Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Thu, 3 Mar 2011 16:29:07 +0000 Subject: [PATCH] 4681: Web report crash (DenominoViso); make external plugin options work again svn: r16750 --- src/gui/plug/_guioptions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gui/plug/_guioptions.py b/src/gui/plug/_guioptions.py index 9e3f3a04b..79703f5f4 100644 --- a/src/gui/plug/_guioptions.py +++ b/src/gui/plug/_guioptions.py @@ -1585,15 +1585,15 @@ def make_gui_option(option, dbstate, uistate, track): ways, too. Takes an Option and returns a GuiOption. """ - for type_, label, widget in _OPTIONS: - if isinstance(option, type_): - break + label, widget = True, None + pmgr = GuiPluginManager.get_instance() + external_options = pmgr.get_external_opt_dict() + if option.__class__ in external_options: + widget = external_options[option.__class__] else: - label, widget = True, None - if option.__class__ in external_options: - pmgr = GuiPluginManager.get_instance() - external_options = pmgr.get_external_opt_dict() - widget = external_options[option.__class__] + for type_, label, widget in _OPTIONS: + if isinstance(option, type_): + break else: raise AttributeError( "can't make GuiOption: unknown option type: '%s'" % option)