From 18af564bef5e7dd05217b9704c3714d421f7d217 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 9 Feb 2001 10:12:19 +0000 Subject: Use ValueError instead of string.atoi.error, since we've switched to int(). --- Lib/sgmllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v0.12