script: Fix the menu check in hurried push
authorNikhil Devshatwar <nikhil.nd@ti.com>
Thu, 19 Nov 2015 13:51:01 +0000 (19:21 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Thu, 19 Nov 2015 13:54:34 +0000 (19:24 +0530)
Fix the menu check which breaks the menu selection of
last available mode.
The last commit 2e9c2437 (script: Add LEGACY mode menu option
to avoid manual/virtual) broke this check.
Fix this.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
iodelay-autogen.py

index bd477e2109c2acc495752e689ab2b958f810230d..0967eaf5735cb9cd4ebc17cc893cf2a94f9118a4 100755 (executable)
@@ -332,7 +332,7 @@ def select_mode(pad, pin, module, virt, man, modehelp, sel):
                        elif (choice == 1):
                                mode = "LEGACY"
                                break
-                       elif (choice >=2 and choice <= len(modelist)):
+                       elif (choice >=2 and choice <= len(modelist) + 1):
                                mode = modelist[choice - 2]
                                break
                        print "ERROR: Invalid choice"