[Zodb-checkins] CVS: Packages/ZConfig - schema.py:1.1.2.34

Fred L. Drake, Jr. fred@zope.com
Thu, 2 Jan 2003 18:07:32 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	schema.py 
Log Message:
Make sure we support an anonymous simple section, and a simple section
which allows any name (but not anonymous sections).


=== Packages/ZConfig/schema.py 1.1.2.33 => 1.1.2.34 ===
--- Packages/ZConfig/schema.py:1.1.2.33	Thu Jan  2 12:26:29 2003
+++ Packages/ZConfig/schema.py	Thu Jan  2 18:06:58 2003
@@ -236,9 +236,10 @@
         handler = self.get_handler(attrs)
         min = self.get_required(attrs) and 1 or 0
         any, name, attribute = self.get_name_info(attrs, "section")
-        if any or not name:
-            self.error("section name may not be '*' or '+'")
-        section = info.SectionInfo(name, sectiontype,
+        if any and not attribute:
+            self.error(
+                "attribute must be specified if section name is '*' or '+'")
+        section = info.SectionInfo(any or name, sectiontype,
                                    min, 1, handler, attribute)
         self._stack[-1].addsection(name, section)
         self._stack.append(section)