Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash/Stacktrace when selecting a value out of range in restore-trash #21

Closed
Ampelbein opened this issue Aug 2, 2013 · 1 comment · Fixed by #27
Closed

Crash/Stacktrace when selecting a value out of range in restore-trash #21

Ampelbein opened this issue Aug 2, 2013 · 1 comment · Fixed by #27

Comments

@Ampelbein
Copy link

When entering a value of of range, restore-trash crashes:

(saucy)andreas@incubator:~$ restore-trash
0 2013-08-02 12:50:39 /home/andreas/temp/2
1 2013-08-02 12:50:39 /home/andreas/temp/1
What file to restore [0..1]: 2
Traceback (most recent call last):
File "/usr/bin/restore-trash", line 9, in
load_entry_point('trash-cli==0.12.7', 'console_scripts', 'restore-trash')()
File "/usr/lib/python2.7/dist-packages/trashcli/cmds.py", line 20, in restore
input = raw_input
File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 549, in run
trashed_files[index].restore()
IndexError: list index out of range

restore-crash should check the user input, give an error and go back to the selection screen when the value entered is invalid.

@andreafrancia
Copy link
Owner

pull request with patched welcome

olajep added a commit to olajep/trash-cli that referenced this issue Oct 9, 2013
olajep added a commit to olajep/trash-cli that referenced this issue Oct 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants