Commit 89c2405c authored by Fred Drake's avatar Fred Drake

[].index() raises ValueError if the value is not in the list, so only

catch that instead of using a bare except clause.
parent 4cc377ed
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment