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

Fred L. Drake fdrake@users.sourceforge.net
Fri, 11 May 2001 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]