mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Use ValueError instead of string.atoi.error, since we've switched to
int().
This commit is contained in:
parent
19e6d6218e
commit
18af564bef
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue