[Python-checkins] python/dist/src/Lib ConfigParser.py,1.55,1.56

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Mon, 30 Dec 2002 22:55:44 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv8788

Modified Files:
	ConfigParser.py 
Log Message:
ConfigParser._interpolate():  Pass the missing key to the
    InterpolationError constructor, not the KeyError exception itself.
    (Caught by the new InterpolationError test.)

SafeConfigParser._interpolate_some():  Pass the right number of
    arguments to the InterpolationError constructor.
    (Caught by pychecker.)


Index: ConfigParser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ConfigParser.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** ConfigParser.py	30 Dec 2002 23:51:45 -0000	1.55
--- ConfigParser.py	31 Dec 2002 06:55:41 -0000	1.56
***************
*** 555,560 ****
                  try:
                      value = value % vars
!                 except KeyError, key:
!                     raise InterpolationError(key, option, section, rawval)
              else:
                  break
--- 555,560 ----
                  try:
                      value = value % vars
!                 except KeyError, e:
!                     raise InterpolationError(e[0], option, section, rawval)
              else:
                  break
***************
*** 600,605 ****
                      v = map[var]
                  except KeyError:
!                     raise InterpolationError(
!                         "no value found for %r" % var)
                  if "%" in v:
                      self._interpolate_some(option, accum, v,
--- 600,604 ----
                      v = map[var]
                  except KeyError:
!                     raise InterpolationError(var, option, section, rest)
                  if "%" in v:
                      self._interpolate_some(option, accum, v,