Fix #2065 : Console crash with missing closing quote
This commit is contained in:
parent
acecd6d522
commit
266127bb69
|
@ -418,7 +418,12 @@ class Legacy(BaseMode):
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.write("{!error!}Unknown command: %s" % cmd)
|
self.write("{!error!}Unknown command: %s" % cmd)
|
||||||
return
|
return
|
||||||
args = self.console._commands[cmd].split(line)
|
|
||||||
|
try:
|
||||||
|
args = self._commands[cmd].split(line)
|
||||||
|
except ValueError, e:
|
||||||
|
self.write("{!error!}Error parsing command: %s" % e)
|
||||||
|
return
|
||||||
|
|
||||||
# Do a little hack here to print 'command --help' properly
|
# Do a little hack here to print 'command --help' properly
|
||||||
parser._print_help = parser.print_help
|
parser._print_help = parser.print_help
|
||||||
|
|
Loading…
Reference in New Issue