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

Fred L. Drake, Jr. fred at zope.com
Fri Aug 1 17:26:06 EDT 2003


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
 




More information about the Zodb-checkins mailing list