[Zodb-checkins] CVS: Packages/ZConfig - Substitution.py:1.3

Fred L. Drake, Jr. fred@zope.com
Thu, 7 Nov 2002 14:03:22 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv1644

Modified Files:
	Substitution.py 
Log Message:
If the mapping containing substitutions does not have a "container"
attribute, don't fail, just stop looking.


=== Packages/ZConfig/Substitution.py 1.2 => 1.3 ===
--- Packages/ZConfig/Substitution.py:1.2	Thu Nov  7 13:54:39 2002
+++ Packages/ZConfig/Substitution.py	Thu Nov  7 14:03:22 2002
@@ -77,12 +77,12 @@
                     "'${%s' not followed by '}'" % name, context)
             v = section.get(name)
             if v is None:
-                parent = section.container
+                parent = getattr(section, "container", None)
                 while parent is not None:
                     v = parent.get(name)
                     if v is not None:
                         break
-                    parent = parent.container
+                    parent = getattr(parent, "container", None)
                 else:
                     v = ""
             if "$" in v and context: