check and repair fixes

svn: r6235
This commit is contained in:
Don Allingham
2006-03-30 17:29:30 +00:00
parent da284dad8b
commit 0813d57df6
4 changed files with 33 additions and 27 deletions

View File

@@ -221,9 +221,10 @@ class OptionListCollection:
Loads the OptionList from the associated file, if it exists.
"""
try:
p = make_parser()
p.setContentHandler(OptionParser(self))
p.parse(self.filename)
if os.path.isfile(self.filename):
p = make_parser()
p.setContentHandler(OptionParser(self))
p.parse(self.filename)
except (IOError,OSError,SAXParseException):
pass

View File

@@ -240,7 +240,7 @@ def cli_tool(database,name,category,tool_class,options_class,options_str_dict):
# Class handling options for plugins
#
#-------------------------------------------------------------------------
class OptionHandler(OptionHandler):
class ToolOptionHandler(OptionHandler):
"""
Implements handling of the options for the plugins.
"""
@@ -276,4 +276,4 @@ class ToolOptions(Options):
if self.enable_dict:
self.options_dict.update(self.enable_dict)
self.handler = OptionHandler(name,self.options_dict,person_id)
self.handler = ToolOptionHandler(name,self.options_dict,person_id)