diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-11 19:44:55 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-11 19:44:55 (GMT) |
commit | 7def25641035d42478c5e8b98364dac5cc0504c0 (patch) | |
tree | cd2ca6d5d03beb225a51abece42368a0666317ed /Demo/tix/tixwidgets.py | |
parent | a2133339ff2e2e4d66b491f9d023976eadfdb8df (diff) | |
download | cpython-7def25641035d42478c5e8b98364dac5cc0504c0.zip cpython-7def25641035d42478c5e8b98364dac5cc0504c0.tar.gz cpython-7def25641035d42478c5e8b98364dac5cc0504c0.tar.bz2 |
[].index() raises ValueError if the value is not in the list, so only
catch that instead of using a bare except clause.
Diffstat (limited to 'Demo/tix/tixwidgets.py')
-rw-r--r-- | Demo/tix/tixwidgets.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Demo/tix/tixwidgets.py b/Demo/tix/tixwidgets.py index b287364..556d3b7 100644 --- a/Demo/tix/tixwidgets.py +++ b/Demo/tix/tixwidgets.py @@ -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. |