mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
[].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:
parent
7def256410
commit
ef4cdad090
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue