diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-11 19:52:03 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-11 19:52:03 (GMT) |
commit | ef4cdad0905c55d921d899cb8b91e58ec6beeb80 (patch) | |
tree | e8e68f3657e9151e5ad56737bdeb874defadaa7a /Demo | |
parent | 7def25641035d42478c5e8b98364dac5cc0504c0 (diff) | |
download | cpython-ef4cdad0905c55d921d899cb8b91e58ec6beeb80.zip cpython-ef4cdad0905c55d921d899cb8b91e58ec6beeb80.tar.gz cpython-ef4cdad0905c55d921d899cb8b91e58ec6beeb80.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')
-rwxr-xr-x | Demo/tix/samples/Control.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Demo/tix/samples/Control.py b/Demo/tix/samples/Control.py index b8e1156..4b31ced 100755 --- a/Demo/tix/samples/Control.py +++ b/Demo/tix/samples/Control.py @@ -86,7 +86,7 @@ def adjust_maker(w, inc): def validate_maker(w): try: i = maker_list.index(demo_maker.get()) - except: + except ValueError: # Works here though. Why ? Beats me. return maker_list[0] # Works here though. Why ? Beats me. |