summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 10:12:19 (GMT)
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 10:12:19 (GMT)
commit18af564bef5e7dd05217b9704c3714d421f7d217 (patch)
tree00ec3b73251bee586480b31632006d174c076922
parent19e6d6218ecd7ec34083ab74c953ccf63d98798a (diff)
downloadcpython-18af564bef5e7dd05217b9704c3714d421f7d217.zip
cpython-18af564bef5e7dd05217b9704c3714d421f7d217.tar.gz
cpython-18af564bef5e7dd05217b9704c3714d421f7d217.tar.bz2
Use ValueError instead of string.atoi.error, since we've switched to
int().
-rw-r--r--Lib/sgmllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py
index 9f4819c..501fe36 100644
--- a/Lib/sgmllib.py
+++ b/Lib/sgmllib.py
@@ -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: