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

int().
This commit is contained in:
Eric S. Raymond 2001-02-09 10:12:19 +00:00
parent 19e6d6218e
commit 18af564bef
1 changed files with 1 additions and 1 deletions

View File

@ -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: