1 | diff --git a/deluge/ui/console/modes/legacy.py b/deluge/ui/console/modes/legacy.py
|
---|
2 | index 144cfa0..bfd505e 100644
|
---|
3 | --- a/deluge/ui/console/modes/legacy.py
|
---|
4 | +++ b/deluge/ui/console/modes/legacy.py
|
---|
5 | @@ -418,7 +418,11 @@ def do_command(self, cmd):
|
---|
6 | except KeyError:
|
---|
7 | self.write("{!error!}Unknown command: %s" % cmd)
|
---|
8 | return
|
---|
9 | - args = self.console._commands[cmd].split(line)
|
---|
10 | + try:
|
---|
11 | + args = self.console._commands[cmd].split(line)
|
---|
12 | + except ValueError, e:
|
---|
13 | + self.write("{!error!}Error parsing command: %s" % e)
|
---|
14 | + return
|
---|
15 |
|
---|
16 | # Do a little hack here to print 'command --help' properly
|
---|
17 | parser._print_help = parser.print_help
|
---|