Commit 1b7e0795 authored by Fred Drake's avatar Fred Drake

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

a bare except clause.
parent 9f9b593f
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment