clicompanion-devs team mailing list archive
-
clicompanion-devs team
-
Mailing list archive
-
Message #00170
[Merge] lp:~dcaro/clicompanion/fix-909545 into lp:clicompanion
David Caro has proposed merging lp:~dcaro/clicompanion/fix-909545 into lp:clicompanion.
Requested reviews:
CLI Companion Development Team (clicompanion-devs)
Related bugs:
Bug #909545 in CLI Companion: "list index out of range when running without selecting"
https://bugs.launchpad.net/clicompanion/+bug/909545
For more details, see:
https://code.launchpad.net/~dcaro/clicompanion/fix-909545/+merge/87102
Just added a little if when executting the command to avoid acessing an empty array.
--
https://code.launchpad.net/~dcaro/clicompanion/fix-909545/+merge/87102
Your team CLI Companion Development Team is requested to review the proposed merge of lp:~dcaro/clicompanion/fix-909545 into lp:clicompanion.
=== modified file 'clicompanion' (properties changed: -x to +x)
=== modified file 'clicompanionlib/controller.py'
--- clicompanionlib/controller.py 2011-11-18 23:56:17 +0000
+++ clicompanionlib/controller.py 2011-12-29 19:10:28 +0000
@@ -362,6 +362,10 @@
## send the command to the terminal
def run_command(self, widget, notebook, liststore):
+ ## if called without selecting a command from the list return
+ if not view.ROW:
+ return
+
text = ""
row_int = int(view.ROW[0][0]) ## removes everything but number from [5,]