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
59426902
Commit
59426902
authored
Feb 05, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added logic to enable read_only mode if the ZOPE_READ_ONLY
environment variable is set.
parent
12c3ef2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+16
-4
No files found.
lib/python/OFS/Application.py
View file @
59426902
...
...
@@ -85,12 +85,12 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.8
6 1999/02/04 19:02:31
jim Exp $'''
__version__
=
'$Revision: 1.8
6
$'
[
11
:
-
2
]
$Id: Application.py,v 1.8
7 1999/02/05 18:02:12
jim Exp $'''
__version__
=
'$Revision: 1.8
7
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
import
time
,
traceback
import
time
,
traceback
,
os
,
string
from
string
import
strip
,
lower
,
find
,
rfind
,
join
from
DateTime
import
DateTime
from
AccessControl.User
import
UserFolder
...
...
@@ -307,7 +307,15 @@ def open_bobobase():
import_products
()
Bobobase
=
Globals
.
Bobobase
=
Globals
.
PickleDictionary
(
Globals
.
BobobaseName
)
revision
=
read_only
=
None
if
os
.
environ
.
has_key
(
'ZOPE_READ_ONLY'
):
read_only
=
1
try
:
revision
=
DateTime
(
os
.
environ
[
'ZOPE_READ_ONLY'
]).
timeTime
()
except
:
pass
Bobobase
=
Globals
.
Bobobase
=
Globals
.
PickleDictionary
(
Globals
.
BobobaseName
,
read_only
=
read_only
,
revision
=
revision
)
product_dir
=
os
.
path
.
join
(
SOFTWARE_HOME
,
'Products'
)
...
...
@@ -420,6 +428,7 @@ def install_products(app):
for
product_name
in
product_names
:
package_dir
=
path_join
(
product_dir
,
product_name
)
__traceback_info__
=
product_name
if
not
isdir
(
package_dir
):
continue
if
not
exists
(
path_join
(
package_dir
,
'__init__.py'
)):
if
not
exists
(
path_join
(
package_dir
,
'__init__.pyc'
)):
...
...
@@ -468,6 +477,9 @@ def install_products(app):
# Set up dynamic project information.
App
.
Product
.
initializeProduct
(
product
,
product_name
,
package_dir
,
app
)
get_transaction
().
note
(
'Installed product '
+
product_name
)
get_transaction
().
commit
()
Folder
.
dynamic_meta_types
=
tuple
(
meta_types
)
Globals
.
default__class_init__
(
Folder
)
...
...
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