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

Fred L. Drake fdrake@users.sourceforge.net
Fri, 11 May 2001 12:52:05 -0700


Update of /cvsroot/python/python/dist/src/Demo/tix/samples
In directory usw-pr-cvs1:/tmp/cvs-serv25848/tix/samples

Modified Files:
	Control.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: Control.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/tix/samples/Control.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Control.py	2001/03/21 07:42:07	1.1
--- Control.py	2001/05/11 19:52:03	1.2
***************
*** 87,91 ****
      try:
  	i = maker_list.index(demo_maker.get())
!     except:
  	# Works here though. Why ? Beats me.
  	return maker_list[0]
--- 87,91 ----
      try:
  	i = maker_list.index(demo_maker.get())
!     except ValueError:
  	# Works here though. Why ? Beats me.
  	return maker_list[0]