[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - datatypes.py:1.2.2.9

Fred L. Drake, Jr. fred@zope.com
Tue, 18 Mar 2003 14:03:52 -0500


Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv5929

Modified Files:
      Tag: new-install-branch
	datatypes.py 
Log Message:
- make LoggerFactory use None instead of a distinct marker; a valid
  logger will never be None
- normalize whitespace


=== Zope/lib/python/Zope/Startup/datatypes.py 1.2.2.8 => 1.2.2.9 ===
--- Zope/lib/python/Zope/Startup/datatypes.py:1.2.2.8	Thu Mar  6 13:27:34 2003
+++ Zope/lib/python/Zope/Startup/datatypes.py	Tue Mar 18 14:03:51 2003
@@ -33,8 +33,6 @@
 # Datatype for the access and trace logs
 # (the loghandler datatypes come from the zLOG package)
 
-_marker = object()
-
 class LoggerFactory:
     """
     A factory used to create loggers while delaying actual logger
@@ -48,10 +46,10 @@
         self.name = section.getSectionName()
         self.level = section.level
         self.handler_factories = section.handlers
-        self.resolved = _marker
+        self.resolved = None
 
     def __call__(self):
-        if self.resolved is _marker:
+        if self.resolved is None:
             # set the logger up
             import logging
             logger = logging.getLogger(self.name)
@@ -69,7 +67,7 @@
 def dns_resolver(hostname):
     from ZServer.medusa import resolver
     return resolver.caching_resolver(hostname)
-    
+
 
 # Datatype for the root configuration object
 # (adds the softwarehome and zopehome fields; default values for some