[Python-checkins] CVS: python/dist/src/Lib htmllib.py,1.17,1.18

Fred L. Drake fdrake@users.sourceforge.net
Fri, 11 May 2001 11:45:54 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv8989

Modified Files:
	htmllib.py 
Log Message:

int() of a string is only expected to through ValueError, so do not use
a bare except clause.


Index: htmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/htmllib.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** htmllib.py	2001/02/09 08:21:17	1.17
--- htmllib.py	2001/05/11 18:45:52	1.18
***************
*** 363,370 ****
              if attrname == 'width':
                  try: width = int(value)
!                 except: pass
              if attrname == 'height':
                  try: height = int(value)
!                 except: pass
          self.handle_image(src, alt, ismap, align, width, height)
  
--- 363,370 ----
              if attrname == 'width':
                  try: width = int(value)
!                 except ValueError: pass
              if attrname == 'height':
                  try: height = int(value)
!                 except ValueError: pass
          self.handle_image(src, alt, ismap, align, width, height)