[Zodb-checkins] CVS: Packages/ZConfig - loader.py:1.1.2.15

Fred L. Drake, Jr. fred@zope.com
Fri, 13 Dec 2002 16:55:22 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	loader.py 
Log Message:
When a handler function is None, don't try to call it.


=== Packages/ZConfig/loader.py 1.1.2.14 => 1.1.2.15 ===
--- Packages/ZConfig/loader.py:1.1.2.14	Fri Dec 13 16:30:30 2002
+++ Packages/ZConfig/loader.py	Fri Dec 13 16:55:21 2002
@@ -166,7 +166,9 @@
             raise ZConfig.ConfigurationError(
                 "undefined handlers: " + ", ".join(L))
         for handler, value in self._handlers:
-            d[handler](value)
+            f = d[handler]
+            if f is not None:
+                f(value)
 
     def __len__(self):
         return len(self._handlers)