#2065 closed bug (Fixed)
Tested - [Console] Crash upon forgetting closing quote
| Reported by: | nogare | Owned by: | Calum |
|---|---|---|---|
| Priority: | trivial | Milestone: | 1.3.6 |
| Component: | Console UI | Version: | 1.3-stable |
| Keywords: | Cc: |
Description
>>> rm --remove_data foo"
rm --remove_data T[ERROR ] 15:31:31 screen:307 No closing quotation
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/deluge-1.3.4_dev-py2.6.egg/deluge/ui/console/screen.py", line 305, in doRead self._doRead()
File "/usr/local/lib/python2.6/dist-packages/deluge-1.3.4_dev-py2.6.egg/deluge/ui/console/screen.py", line 318, in _doRead self.command_parser(self.input.encode(self.encoding))
File "/usr/local/lib/python2.6/dist-packages/deluge-1.3.4_dev-py2.6.egg/deluge/ui/console/main.py", line 299, in do_command
args = self._commands[cmd].split(line)
File "/usr/local/lib/python2.6/dist-packages/deluge-1.3.4_dev-py2.6.egg/deluge/ui/console/main.py", line 115, in split
return shlex.split(text)
File "/usr/lib/python2.6/shlex.py", line 279, in split
return list(lex)
File "/usr/lib/python2.6/shlex.py", line 269, in next token = self.get_token()
File "/usr/lib/python2.6/shlex.py", line 96, in get_token
raw = self.read_token()
File "/usr/lib/python2.6/shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation
If you type a command say rm --remove_data "foo bar and hit enter console dies. Instead the user should be informed that they forgot to add a closing quotation.
Attachments (2)
Change History (9)
by , 14 years ago
comment:2 by , 14 years ago
| Summary: | [Console] Crash upon forgetting closing quote → Tested - [Console] Crash upon forgetting closing quote |
|---|
Tested this patch with 1.3.5 and it works fine.
Dan39; could you generate a .patch for deluge/ui/console/modes/legacy.py (which you will find in git master) The same code should work.
comment:3 by , 14 years ago
| Milestone: | Future → 1.3.6 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
by , 14 years ago
| Attachment: | gitmasterpatch added |
|---|
patch for git master deluge/ui/console/legacy.py
comment:4 by , 14 years ago
been a whole week... but here you :P
(yea i put wrong path for description of attachment... o well doesn't matter :P)
comment:5 by , 14 years ago
Cas: Tested on git master and it fixes the problem. Once these patch's have been applied this ticket can be closed



patch