[Zope3-checkins] CVS: Packages/ZConfig - info.py:1.1.2.21
Chris McDonough
chrism@zope.com
Wed, 1 Jan 2003 05:13:28 -0500
Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv19446
Modified Files:
Tag: zconfig-schema-devel-branch
info.py
Log Message:
Part of Collector #3. Patch up SectionInfo so that config-missing and unrequired sections have a null getdefault method, preventing errors from occurring in matcher.finish. We will compensate by performing procedural default section value insertion.
=== Packages/ZConfig/info.py 1.1.2.20 => 1.1.2.21 ===
--- Packages/ZConfig/info.py:1.1.2.20 Tue Dec 24 13:36:12 2002
+++ Packages/ZConfig/info.py Wed Jan 1 05:13:28 2003
@@ -175,6 +175,12 @@
else:
return name == self.name
+ def getdefault(self):
+ # sections cannot have defaults
+ if self.maxOccurs > 1:
+ return []
+ else:
+ return None
class TypeContainer:
def __init__(self):