diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py index 174d667bd..f6653061e 100644 --- a/deluge/ui/console/main.py +++ b/deluge/ui/console/main.py @@ -295,7 +295,12 @@ Please use commands from the command line, eg:\n except KeyError: self.write("{!error!}Unknown command: %s" % cmd) return - args = self._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 parser._print_help = parser.print_help