[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - handlers.py:1.1.2.4
Fred L. Drake, Jr.
fred@zope.com
Wed, 15 Jan 2003 11:37:57 -0500
Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv29171
Modified Files:
Tag: chrism-install-branch
handlers.py
Log Message:
Clean up imports.
=== Zope/lib/python/Zope/Startup/handlers.py 1.1.2.3 => 1.1.2.4 ===
--- Zope/lib/python/Zope/Startup/handlers.py:1.1.2.3 Tue Jan 14 22:39:05 2003
+++ Zope/lib/python/Zope/Startup/handlers.py Wed Jan 15 11:37:54 2003
@@ -1,14 +1,13 @@
-from misc.factory import Factory
import os
-from os.path import dirname
-pjoin = os.path.join
import types
+from misc.factory import Factory
+
# top-level key handlers
def _setenv(name, value):
- if ( type(value) is types.StringType or
- type(value) is types.UnicodeType ):
+ if ( isinstance(value, types.StringType)
+ or isinstance(value, types.UnicodeType)):
os.environ[name] = value
else:
os.environ[name] = `value`
@@ -180,19 +179,19 @@
# not in the config
if config.zope_home is None:
config.zope_home = zope_home(
- dirname(dirname(config.software_home))
+ os.path.dirname(os.path.dirname(config.software_home))
)
if config.client_home is None:
config.client_home = client_home(
- pjoin(config.instance_home, 'var')
+ os.path.join(config.instance_home, 'var')
)
# set up defaults for pid_filename and lock_filename if they're
# not in the config
if config.pid_filename is None:
- config.pid_filename = pjoin(config.client_home, 'Z2.pid')
+ config.pid_filename = os.path.join(config.client_home, 'Z2.pid')
if config.lock_filename is None:
- config.lock_filename = pjoin(config.client_home, 'Z2.lock')
+ config.lock_filename = os.path.join(config.client_home, 'Z2.lock')
# set up a default root filestorage if there are no root storages
# mentioned in the config
@@ -202,7 +201,7 @@
from datatypes import DBWrapper, Factory
storagefactory = Factory(
'ZODB.FileStorage.FileStorage', None,
- *[pjoin(config.client_home, 'Data.fs')], **{}
+ *[os.path.join(config.client_home, 'Data.fs')], **{}
)
dbfactory = Factory('ZODB.DB', None, *[], **{})
databases.append((['/'], DBWrapper(dbfactory, storagefactory)))