Commit 7c1e5adf authored by Fred Drake's avatar Fred Drake

Make ConfigParser.Error inherit from Exception.

parent 5255c791
...@@ -96,11 +96,13 @@ MAX_INTERPOLATION_DEPTH = 10 ...@@ -96,11 +96,13 @@ MAX_INTERPOLATION_DEPTH = 10
# exception classes # exception classes
class Error: class Error(Exception):
def __init__(self, msg=''): def __init__(self, msg=''):
self._msg = msg self._msg = msg
Exception.__init__(self, msg)
def __repr__(self): def __repr__(self):
return self._msg return self._msg
__str__ = __repr__
class NoSectionError(Error): class NoSectionError(Error):
def __init__(self, section): def __init__(self, section):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment