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

catch that instead of using a bare except clause.
This commit is contained in:
Fred Drake 2001-05-11 19:52:03 +00:00
parent 7def256410
commit ef4cdad090

View file

@ -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.