[Zope3-checkins] CVS: Packages/ZConfig - loader.py:1.17

Fred L. Drake, Jr. fred@zope.com
Wed, 19 Feb 2003 16:30:15 -0500


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

Modified Files:
	loader.py 
Log Message:
Move creation of the schema matcher to a separate method.


=== Packages/ZConfig/loader.py 1.16 => 1.17 ===
--- Packages/ZConfig/loader.py:1.16	Wed Feb 19 15:35:38 2003
+++ Packages/ZConfig/loader.py	Wed Feb 19 16:30:14 2003
@@ -163,10 +163,13 @@
         self.schema = schema
 
     def loadResource(self, resource):
-        sm = ZConfig.matcher.SchemaMatcher(self.schema)
+        sm = self.createSchemaMatcher()
         self._parse_resource(sm, resource)
         result = sm.finish(), CompositeHandler(sm.handlers, self.schema)
         return result
+
+    def createSchemaMatcher(self):
+        return ZConfig.matcher.SchemaMatcher(self.schema)
 
     # config parser support API