[Zope3-checkins] CVS: Zope3/src/zope/app/startup - metaconfigure.py:1.1.2.2 servertyperegistry.py:1.1.2.2

Fred L. Drake, Jr. fred@zope.com
Tue, 24 Dec 2002 12:58:09 -0500


Update of /cvs-repository/Zope3/src/zope/app/startup
In directory cvs.zope.org:/tmp/cvs-serv17888

Modified Files:
      Tag: NameGeddon-branch
	metaconfigure.py servertyperegistry.py 
Log Message:
Make zope.app.startup pass the tests:
- fixup imports
- normalize whitespace
- remove empty docstrings


=== Zope3/src/zope/app/startup/metaconfigure.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/startup/metaconfigure.py:1.1.2.1	Mon Dec 23 14:32:30 2002
+++ Zope3/src/zope/app/startup/metaconfigure.py	Tue Dec 24 12:58:08 2002
@@ -2,33 +2,32 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
-This module handles the :startup directives. 
+This module handles the :startup directives.
 
 $Id$
 """
 
 from zope.app.startup.sitedefinition import SiteDefinition
 from zope.configuration.action import Action
+from zope.app.startup import requestfactoryregistry
+from zope.app.startup import servertyperegistry
 from zope.app.startup.requestfactory import RequestFactory
-import zope.app.startup.requestfactoryregistry
 from zope.app.startup.servertype import ServerType
-import zope.app.startup.servertyperegistry
 
 defineSite = SiteDefinition
 
 
 def registerRequestFactory(_context, name, publication, request):
-    """ """
     publication = _context.resolve(publication)
     request = _context.resolve(request)
     request_factory = RequestFactory(publication, request)
@@ -36,7 +35,7 @@
     return [
         Action(
             discriminator = name,
-            callable = RequestFactoryRegistry.registerRequestFactory,
+            callable = requestfactoryregistry.registerRequestFactory,
             args = (name, request_factory,),
             )
         ]
@@ -44,26 +43,23 @@
 
 def registerServerType(_context, name, factory, requestFactory, logFactory,
                        defaultPort, defaultVerbose):
-    """ """
     factory = _context.resolve(factory)
     logFactory = _context.resolve(logFactory)
 
     if defaultVerbose.lower() == 'true':
-        defaultVerbose = 1
+        defaultVerbose = True
     else:
-        defaultVerbose = 0
+        defaultVerbose = False
 
     defaultPort = int(defaultPort)
 
     server_type = ServerType(name, factory, requestFactory, logFactory,
                              defaultPort, defaultVerbose)
-    
 
     return [
         Action(
             discriminator = name,
-            callable = ServerTypeRegistry.registerServerType,
+            callable = servertyperegistry.registerServerType,
             args = (name, server_type),
             )
         ]
-


=== Zope3/src/zope/app/startup/servertyperegistry.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/startup/servertyperegistry.py:1.1.2.1	Mon Dec 23 14:32:30 2002
+++ Zope3/src/zope/app/startup/servertyperegistry.py	Tue Dec 24 12:58:08 2002
@@ -2,21 +2,22 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 $Id$
 """
-from zope.app.startup.simpleregistry import SimpleRegistry
 from zope.app.interfaces.startup.simpleregistry import ISimpleRegistry
-from zope.app.startup.servertype import IServerType 
+from zope.app.startup.servertype import IServerType
+from zope.app.startup.simpleregistry import SimpleRegistry
+
 
 class IServerTypeRegistry(ISimpleRegistry):
     """
@@ -28,7 +29,6 @@
     fields. If the fields are instances, they must implement
     IInstanceFactory.
     """
-    pass
 
 
 class ServerTypeRegistry(SimpleRegistry):