[Zodb-checkins] CVS: Packages/ZConfig - info.py:1.1.2.10

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


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	info.py 
Log Message:
- More pre-Python 2.2.2 compatibility
- Fix reference to attribute missed when SectionType and SectionInfo
  were separated.


=== Packages/ZConfig/info.py 1.1.2.9 => 1.1.2.10 ===
--- Packages/ZConfig/info.py:1.1.2.9	Thu Dec 12 13:48:58 2002
+++ Packages/ZConfig/info.py	Thu Dec 12 15:08:51 2002
@@ -22,6 +22,12 @@
     True = 1
     False = 0
 
+    def bool(value):
+        if value:
+            return True
+        else:
+            return False
+
 
 class UnboundedThing:
     def __lt__(self, other):
@@ -224,7 +230,7 @@
                             "name %s must be used for a %s section"
                             % (`name`, `info.sectiontype.name`))
                     return index
-            elif info.typename == type:
+            elif info.sectiontype.name == type:
                 if not (name or info.allowUnnamed()):
                     raise ZConfig.ConfigurationError(
                         `type` + " sections must be named")