]> granicus.if.org Git - python/commitdiff
Make ConfigParser.Error inherit from Exception.
authorFred Drake <fdrake@acm.org>
Mon, 11 Dec 2000 18:13:19 +0000 (18:13 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 11 Dec 2000 18:13:19 +0000 (18:13 +0000)
Lib/ConfigParser.py

index 59bf4b5b787127b14a2923d83ecfb2953e585567..2f60742ddbbb0912fb638f0ffe5ccf386bb539fa 100644 (file)
@@ -96,11 +96,13 @@ MAX_INTERPOLATION_DEPTH = 10
 
 \f
 # exception classes
-class Error:
+class Error(Exception):
     def __init__(self, msg=''):
         self._msg = msg
+        Exception.__init__(self, msg)
     def __repr__(self):
         return self._msg
+    __str__ = __repr__
 
 class NoSectionError(Error):
     def __init__(self, section):