list index out of range when editing

Bug #802303 reported by David Caro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
Low
Unassigned

Bug Description

When running clicompanion, if you edit the last command, and then move the command somewhere else on the list, if you click edit again (without selecting another command) you get a list index out of range error, just because you are not selecting any rows.

$ clicompanion
using locale in system
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/clicompanionlib/controller.py", line 185, in edit_command
    row_int_x = int(view.ROW[0][0])
IndexError: list index out of range

Patch appended, just added a simple if to assure that the view.ROW object is not null (or empty in this case).

Related branches

Revision history for this message
David Caro (dcaro) wrote :
summary: - list index out of range whe editing
+ list index out of range when editing
Revision history for this message
Marek Bardoński (bdfhjk) wrote :

Patch checked and have my recommendation.

Ready to merge to trunk.

Thanks!

Changed in clicompanion:
importance: Undecided → Low
status: New → Fix Committed
David Caro (dcaro)
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.