]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use ValueError instead of string.atoi.error, since we've switched to
authorEric S. Raymond <esr@thyrsus.com>
Fri, 9 Feb 2001 10:12:19 +0000 (10:12 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 9 Feb 2001 10:12:19 +0000 (10:12 +0000)
int().

Lib/sgmllib.py

index 9f4819caa27621cb16f081f81051f9346a16a291..501fe36d79d2968e08471df84b615df002b4d840 100644 (file)
@@ -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: