[Zope3-checkins] CVS: Zope3/src/zope/app/startup - sitedefinition.py:1.1.2.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 24 Dec 2002 12:33:26 -0500
Update of /cvs-repository/Zope3/src/zope/app/startup
In directory cvs.zope.org:/tmp/cvs-serv14092
Modified Files:
Tag: NameGeddon-branch
sitedefinition.py
Log Message:
- fix up imports
- normalize whitespace
=== Zope3/src/zope/app/startup/sitedefinition.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/startup/sitedefinition.py:1.1.2.2 Tue Dec 24 07:51:20 2002
+++ Zope3/src/zope/app/startup/sitedefinition.py Tue Dec 24 12:33:25 2002
@@ -2,28 +2,27 @@
#
# 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$
"""
-import sys
import logging
-import asyncore
+import sys
-# Importing ZLogIntegration redirects asyncore's logging to the
+# Importing zlogintegration redirects asyncore's logging to the
# logging module
-from zope.server import ZLogIntegration
+from zope.server import zlogintegration
# Import Configuration-related classes
from zope.configuration.action import Action
@@ -32,13 +31,13 @@
from zope.app.startup.servertyperegistry import getServerType
-# Import Undo-related classes
-from zope.component import getService
-from zope.app.undo import ZODBUndoManager
-from zope.app.interfaces.undo import IUndoManager
+# Import Undo-related classes
from zope.app.content.folder import RootFolder
-from zope.server.taskthreads import ThreadedTaskDispatcher
+from zope.app.interfaces.undo import IUndoManager
from zope.app.publication.zopepublication import ZopePublication
+from zope.app.undo import ZODBUndoManager
+from zope.component import getService
+from zope.server.taskthreads import ThreadedTaskDispatcher
from zodb.code.module import PersistentModuleImporter
@@ -49,7 +48,7 @@
class SiteDefinition:
- __class_implements__ = INonEmptyDirective
+ __class_implements__ = INonEmptyDirective
__implements__ = ISubdirectiveHandler
# Some special file names for log files
@@ -66,7 +65,7 @@
'NOTSET' : logging.NOTSET,
}
-
+
def __init__(self, _context, name="default", threads=4):
"""Initialize is called when defineSite directive is invoked."""
self._name = name
@@ -153,7 +152,7 @@
'verbose': verbose}
else:
sys.stderr.out('Warning: Server of Type %s does not exist. ' +
- 'Directive neglected.')
+ 'Directive neglected.')
return []
@@ -173,7 +172,7 @@
# Setup the task dispatcher
td = ThreadedTaskDispatcher()
td.setThreadCount(self._threads)
-
+
# check whether a root was already specified for this ZODB; if
# not create one.
self._initDB()