[].index() raises ValueError if the value is not in the list, so only
catch that instead of using a bare except clause.
This commit is contained in:
parent
a2133339ff
commit
7def256410
|
@ -294,7 +294,7 @@ def spin_validate(w):
|
|||
|
||||
try:
|
||||
i = states.index(demo_spintxt.get())
|
||||
except:
|
||||
except ValueError:
|
||||
return states[0]
|
||||
return states[i]
|
||||
# why this procedure works as opposed to the previous one beats me.
|
||||
|
|
Loading…
Reference in New Issue