summaryrefslogtreecommitdiff
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-11 18:13:19 +0000
committerFred Drake <fdrake@acm.org>2000-12-11 18:13:19 +0000
commit6e44094b458a816b783b102cccb1a77c597ab323 (patch)
treeba1ff02038ab0148e33b9b7d674ee4b85d1e2013 /Lib/ConfigParser.py
parent6fcb4311906fdb2aec1a51d1dae7ee49452faa98 (diff)
downloadcpython-6e44094b458a816b783b102cccb1a77c597ab323.tar.gz
Make ConfigParser.Error inherit from Exception.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 59bf4b5b78..2f60742ddb 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -96,11 +96,13 @@ MAX_INTERPOLATION_DEPTH = 10
# 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):