From 7def25641035d42478c5e8b98364dac5cc0504c0 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 11 May 2001 19:44:55 +0000 Subject: [PATCH] [].index() raises ValueError if the value is not in the list, so only catch that instead of using a bare except clause. --- Demo/tix/tixwidgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demo/tix/tixwidgets.py b/Demo/tix/tixwidgets.py index b2873648d8c..556d3b7797b 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.