Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#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)

patch (666 bytes ) - added by Dan39 13 years ago.
patch
gitmasterpatch (714 bytes ) - added by Dan39 12 years ago.
patch for git master deluge/ui/console/legacy.py

Download all attachments as: .zip

Change History (9)

by Dan39, 13 years ago

Attachment: patch added

patch

comment:1 by Dan39, 13 years ago

here we go :D

attached patch

comment:2 by nogare, 13 years ago

Summary: [Console] Crash upon forgetting closing quoteTested - [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 Calum, 13 years ago

Milestone: Future1.3.6
Owner: set to Calum
Status: newassigned

by Dan39, 12 years ago

Attachment: gitmasterpatch added

patch for git master deluge/ui/console/legacy.py

comment:4 by Dan39, 12 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 nogare, 12 years ago

Cas: Tested on git master and it fixes the problem. Once these patch's have been applied this ticket can be closed

comment:6 by nogare, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

comment:7 by Calum, 12 years ago

Type: defectbug

1.3-stable: 483c439e385

Note: See TracTickets for help on using tickets.