[Python-checkins] CVS: python/dist/src/Lib ConfigParser.py,1.24,1.25

Fred L. Drake python-dev@python.org
Mon, 11 Dec 2000 10:13:23 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv27989

Modified Files:
	ConfigParser.py 
Log Message:

Make ConfigParser.Error inherit from Exception.


Index: ConfigParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** ConfigParser.py	2000/12/04 16:29:13	1.24
--- ConfigParser.py	2000/12/11 18:13:19	1.25
***************
*** 97,105 ****
  
  # exception classes
! class Error:
      def __init__(self, msg=''):
          self._msg = msg
      def __repr__(self):
          return self._msg
  
  class NoSectionError(Error):
--- 97,107 ----
  
  # exception classes
! 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):