summaryrefslogtreecommitdiff
path: root/Demo/tix
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 19:52:03 +0000
committerFred Drake <fdrake@acm.org>2001-05-11 19:52:03 +0000
commit01cdc1eddb161a1770c6cd8035880c023bf3ec88 (patch)
treeb606626d2ce4dbff695a769a42de78230b9070e2 /Demo/tix
parent89c2405c303fcf48902621212a3d7cc5950cf587 (diff)
downloadcpython-01cdc1eddb161a1770c6cd8035880c023bf3ec88.tar.gz
[].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')
-rwxr-xr-xDemo/tix/samples/Control.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Demo/tix/samples/Control.py b/Demo/tix/samples/Control.py
index b8e1156582..4b31ced5da 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.