_Tool.py: Pythonic style change in try...except...else

svn: r12611
This commit is contained in:
Gerald Britton 2009-06-02 14:46:25 +00:00
parent aa800b3ad6
commit 078207d9fa

View File

@ -86,10 +86,11 @@ class Tool(object):
if issubclass(options_class, MenuToolOptions):
# FIXME: pass in person_id
self.options = options_class(name, None, dbstate)
else: # must be some kind of class or we get a TypeError
self.options = options_class(name)
except TypeError:
self.options = options_class
else: # must be some kind of class or we get a TypeError
self.options = options_class(name)
self.options.load_previous_values()
def run_tool(self):