mirror of https://github.com/python/cpython
Use ValueError instead of string.atoi.error, since we've switched to
int().
This commit is contained in:
parent
19e6d6218e
commit
18af564bef
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue