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

a bare except clause.
This commit is contained in:
Fred Drake 2001-05-11 18:45:52 +00:00
parent 9f9b593f8d
commit 1b7e079528

View file

@ -362,10 +362,10 @@ class HTMLParser(SGMLParser):
src = value
if attrname == 'width':
try: width = int(value)
except: pass
except ValueError: pass
if attrname == 'height':
try: height = int(value)
except: pass
except ValueError: pass
self.handle_image(src, alt, ismap, align, width, height)
# --- Really Old Unofficial Deprecated Stuff