[Zope3-checkins] CVS: Zope3/src/ZConfig - substitution.py:1.3

Fred L. Drake, Jr. fred@zope.com
Fri, 1 Aug 2003 16:26:05 -0400


Update of /cvs-repository/Zope3/src/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv6526

Modified Files:
	substitution.py 
Log Message:
Report the exact capitalization of the name for which substitution is
being attempted.


=== Zope3/src/ZConfig/substitution.py 1.2 => 1.3 ===
--- Zope3/src/ZConfig/substitution.py:1.2	Fri Jan  3 16:05:51 2003
+++ Zope3/src/ZConfig/substitution.py	Fri Aug  1 16:25:59 2003
@@ -28,12 +28,12 @@
         result = ''
         rest = s
         while rest:
-            p, name, rest = _split(rest)
+            p, name, namecase, rest = _split(rest)
             result += p
             if name:
                 v = mapping.get(name)
                 if v is None:
-                    raise ZConfig.SubstitutionReplacementError(s, name)
+                    raise ZConfig.SubstitutionReplacementError(s, namecase)
                 result += v
         return result
     else:
@@ -81,7 +81,7 @@
                     "'$' not followed by '$' or name")
             name = m.group(0)
             i = m.end()
-        return prefix, name.lower(), s[i:]
+        return prefix, name.lower(), name, s[i:]
     else:
         return s, None, None