Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ffd50b54
Commit
ffd50b54
authored
Jan 06, 2003
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert change that was mistakenly merged from chrism-install-branch into the
trunk.
parent
66604b16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
23 deletions
+7
-23
lib/python/Zope/App/startup.py
lib/python/Zope/App/startup.py
+7
-23
No files found.
lib/python/Zope/App/startup.py
View file @
ffd50b54
...
...
@@ -31,38 +31,25 @@ import AccessControl.User
import
ZPublisher
import
ExtensionClass
from
zLOG
import
LOG
,
WARNING
,
INFO
,
BLATHER
,
log_time
from
Zope
import
Startup
def
startup
():
config
=
Startup
.
getConfiguration
()
def
startup
():
global
ZODB
,
app
Globals
.
BobobaseName
=
os
.
path
.
join
(
Globals
.
data_dir
,
'Data.fs'
)
Globals
.
DatabaseVersion
=
'3'
# Import products
OFS
.
Application
.
import_products
()
# Set up a root database from zconfig data
zconfig_db
=
None
set_root
=
0
for
mount_points
,
dbfactory
in
config
.
databases
:
# only use root for now
if
'/'
in
mount_points
:
if
set_root
:
raise
ConfigurationError
,
(
"Cannot specify more than one 'root' / database"
)
zconfig_db
=
dbfactory
()
Globals
.
BobobaseName
=
zconfig_db
.
getName
()
set_root
=
1
# Open the database
try
:
#
Root db/storage in custom_zodb overrides zconfig_db
#
Try to use custom storage
m
=
imp
.
find_module
(
'custom_zodb'
,[
INSTANCE_HOME
])
except
:
DB
=
zconfig_db
import
ZODB.FileStorage
storage
=
ZODB
.
FileStorage
.
FileStorage
(
Globals
.
BobobaseName
)
DB
=
ZODB
.
DB
(
storage
)
else
:
m
=
imp
.
load_module
(
'Zope.custom_zodb'
,
m
[
0
],
m
[
1
],
m
[
2
])
if
hasattr
(
m
,
'DB'
):
...
...
@@ -74,9 +61,6 @@ def startup():
Globals
.
BobobaseName
=
DB
.
getName
()
sys
.
modules
[
'Zope.custom_zodb'
]
=
m
if
DB
is
None
:
raise
Startup
.
ConfigurationError
,
"Must specify a root ('/') database"
if
DB
.
getActivityMonitor
()
is
None
:
from
ZODB.ActivityMonitor
import
ActivityMonitor
DB
.
setActivityMonitor
(
ActivityMonitor
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment