fix handling of subcommands (fixes #51)

This commit is contained in:
Martin Baeuml
2011-09-14 18:25:57 +02:00
parent 491184720b
commit f5c3cef173
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ class LaxOptionParser(OptionParser):
"""
An option parser that doesn't raise any errors on unknown options.
This is needed because the --settings and --pythonpath options affect
This is needed because the --config and --pythonpath options may affect
the commands (and thus the options) that are available to the user.
"""
def error(self, msg):
+1 -2
View File
@@ -101,7 +101,6 @@ class LabelTool(QObject):
option_list=BaseCommand.option_list)
try:
options, args = parser.parse_args(self.argv)
handle_default_options(options)
except:
pass # Ignore any option errors at this point.
@@ -121,7 +120,7 @@ class LabelTool(QObject):
# check for commands
try:
subcommand = self.argv[1]
subcommand = args[1]
except IndexError:
subcommand = None