[Zope3-checkins] CVS: Packages/ZConfig - matcher.py:1.1.2.3

Fred L. Drake, Jr. fred@zope.com
Tue, 10 Dec 2002 15:59:13 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	matcher.py 
Log Message:
Minor changes, makes things actually start to work.  ;-)


=== Packages/ZConfig/matcher.py 1.1.2.2 => 1.1.2.3 ===
--- Packages/ZConfig/matcher.py:1.1.2.2	Tue Dec 10 15:33:11 2002
+++ Packages/ZConfig/matcher.py	Tue Dec 10 15:59:12 2002
@@ -1,5 +1,7 @@
 """Utility that manages the binding of configuration data to a section."""
 
+import types
+
 import ZConfig
 
 
@@ -70,6 +72,8 @@
                 L = [ci.getdefault()]
             if ci.ismulti():
                 values[i] = [ci.datatype.convert(s) for s in L]
+            elif ci.issection() and ci.datatype is None:
+                values[i] = L[0]
             else:
                 assert len(L) == 1
                 values[i] = ci.datatype.convert(L[0])
@@ -98,7 +102,7 @@
         return len(self._keys)
 
     def __getitem__(self, index):
-        if isinstance(index, slice):
+        if isinstance(index, types.SliceType):
             raise TypeError("SectionValue does not support slicing")
         return self._values[index]