[Zope3-checkins] CVS: Packages/ZConfig - cfgparser.py:1.1.2.5

Fred L. Drake, Jr. fred@zope.com
Thu, 12 Dec 2002 14:25:22 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	cfgparser.py 
Log Message:
Make sure empty sections using the empty section syntax get finished
properly.


=== Packages/ZConfig/cfgparser.py 1.1.2.4 => 1.1.2.5 ===
--- Packages/ZConfig/cfgparser.py:1.1.2.4	Wed Dec 11 15:20:37 2002
+++ Packages/ZConfig/cfgparser.py	Thu Dec 12 14:25:21 2002
@@ -90,11 +90,13 @@
                                                 delegatename)
         except ConfigurationError, e:
             self.error(e[0])
-        if not isempty:
+
+        if isempty:
+            self.context.endSection(section, type, name, delegatename, newsect)
+            return section
+        else:
             self.stack.append((type, name, delegatename, section))
             return newsect
-        else:
-            return section
 
     def end_section(self, section, rest):
         if not self.stack: