[Zope3-checkins] CVS: Packages/ZConfig - schema.py:1.1.2.27

Fred L. Drake, Jr. fred@zope.com
Thu, 19 Dec 2002 09:15:08 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	schema.py 
Log Message:
Adjust checks in get_key_info(), in preparation for supporting <key name='*'>.

=== Packages/ZConfig/schema.py 1.1.2.26 => 1.1.2.27 ===
--- Packages/ZConfig/schema.py:1.1.2.26	Wed Dec 18 17:22:16 2002
+++ Packages/ZConfig/schema.py	Thu Dec 19 09:15:07 2002
@@ -248,7 +248,9 @@
 
     def get_key_info(self, attrs, element):
         any, name, attribute = self.get_name_info(attrs, element)
-        if not name:
+        if any == '*':
+            self.error(element + " may not specify '*' for name")
+        if not name and any != '+':
             self.error(element + " name may not be omitted or empty")
         datatype = self.get_datatype(attrs, "datatype", "str")
         handler = self.get_handler(attrs)