Commit 18af564b authored by Eric S. Raymond's avatar Eric S. Raymond

Use ValueError instead of string.atoi.error, since we've switched to

int().
parent 19e6d621
......@@ -354,7 +354,7 @@ class SGMLParser:
def handle_charref(self, name):
try:
n = int(name)
except string.atoi_error:
except ValueError:
self.unknown_charref(name)
return
if not 0 <= n <= 255:
......
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