summaryrefslogtreecommitdiffstats
path: root/deluge/ui/console/main.py
diff options
context:
space:
mode:
authorDan39 <dan39>2012-04-19 15:52:44 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2012-04-19 15:52:59 +0100
commit483c439e385fea093d3ea33d6de5c40bb35b4042 (patch)
treec859138d809cf187411bcb97dc641ca877d70f0c /deluge/ui/console/main.py
parent914413c88fb17ef67808dd21784cd9f4344ed3e3 (diff)
downloaddeluge-483c439e385.zip
deluge-483c439e385.tar.gz
deluge-483c439e385.tar.bz2
Fix #2065 : Console crash with missing closing quote
Diffstat (limited to 'deluge/ui/console/main.py')
-rw-r--r--deluge/ui/console/main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/deluge/ui/console/main.py b/deluge/ui/console/main.py
index 174d667..f665306 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