Ticket #2065: patch

File patch, 666 bytes (added by Dan39, 12 years ago)

patch

  • deluge/ui/console/main.py

    diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py
    index 174d667..9b9e154 100644
    a b def do_command(self, cmd): 
    295295        except KeyError: 
    296296            self.write("{!error!}Unknown command: %s" % cmd) 
    297297            return 
    298         args = self._commands[cmd].split(line) 
     298        try: 
     299            args = self._commands[cmd].split(line) 
     300        except ValueError, e: 
     301            self.write("{!error!}Error parsing command: %s" % e) 
     302            return 
    299303 
    300304        # Do a little hack here to print 'command --help' properly 
    301305        parser._print_help = parser.print_help