From: Eric S. Raymond Date: Fri, 9 Feb 2001 10:12:19 +0000 (+0000) Subject: Use ValueError instead of string.atoi.error, since we've switched to X-Git-Tag: v2.1b1~461 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18af564bef5e7dd05217b9704c3714d421f7d217;p=thirdparty%2FPython%2Fcpython.git Use ValueError instead of string.atoi.error, since we've switched to int(). --- diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index 9f4819caa276..501fe36d79d2 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: