[Python-checkins] CVS: python/dist/src/Demo/tix tixwidgets.py,1.1,1.2

Fred L. Drake fdrake@users.sourceforge.net
2001年5月11日 12:44:57 -0700


Update of /cvsroot/python/python/dist/src/Demo/tix
In directory usw-pr-cvs1:/tmp/cvs-serv24090/tix
Modified Files:
	tixwidgets.py 
Log Message:
[].index() raises ValueError if the value is not in the list, so only
catch that instead of using a bare except clause.
Index: tixwidgets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/tix/tixwidgets.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** tixwidgets.py	2001年03月21日 07:42:07	1.1
--- tixwidgets.py	2001年05月11日 19:44:55	1.2
***************
*** 295,299 ****
 try:
 	i = states.index(demo_spintxt.get())
! except:
 	return states[0]
 return states[i]
--- 295,299 ----
 try:
 	i = states.index(demo_spintxt.get())
! except ValueError:
 	return states[0]
 return states[i]

AltStyle によって変換されたページ (->オリジナル) /