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
8b47dcb4
Commit
8b47dcb4
authored
Jan 18, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed checkGlobalRegistry().
parent
461829d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+24
-6
No files found.
lib/python/OFS/Application.py
View file @
8b47dcb4
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.13
6 2001/01/18 20:40:45 brian
Exp $'''
__version__
=
'$Revision: 1.13
6
$'
[
11
:
-
2
]
$Id: Application.py,v 1.13
7 2001/01/18 21:45:03 shane
Exp $'''
__version__
=
'$Revision: 1.13
7
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
sys
,
App
.
Product
,
App
.
ProductRegistry
,
misc_
import
time
,
traceback
,
os
,
string
,
Products
...
...
@@ -322,7 +322,7 @@ class Application(Globals.ApplicationDefaultPermissions,
jar
.
root
()[
'ZGlobals'
]
=
BTree
.
BTree
()
products
=
self
.
Control_Panel
.
Products
for
product
in
products
.
objectValues
():
LOG
(
'Zope'
,
INFO
,
'
Checking
product: %s'
%
product
.
id
)
LOG
(
'Zope'
,
INFO
,
'
Searching in
product: %s'
%
product
.
id
)
items
=
list
(
product
.
objectItems
())
finished
=
[]
idx
=
0
...
...
@@ -333,9 +333,27 @@ class Application(Globals.ApplicationDefaultPermissions,
idx
=
idx
+
1
continue
finished
.
append
(
base
)
LOG
(
'Zope'
,
WARNING
,
'Successfully rebuilt global product registry'
)
try
:
# Try to re-register ZClasses.
if
hasattr
(
ob
,
'_register'
)
and
hasattr
(
ob
,
'_zclass_'
):
ob
.
_register
()
# Include subobjects.
if
hasattr
(
ob
,
'objectItems'
):
m
=
list
(
ob
.
objectItems
())
items
.
extend
(
m
)
# Try to find ZClasses-in-ZClasses.
if
hasattr
(
ob
,
'propertysheets'
):
ps
=
ob
.
propertysheets
if
(
hasattr
(
ps
,
'methods'
)
and
hasattr
(
ps
.
methods
,
'objectItems'
)):
m
=
list
(
ps
.
methods
.
objectItems
())
items
.
extend
(
m
)
except
:
LOG
(
'Zope'
,
WARNING
,
'Broken objects exist in product %s.'
%
product
.
id
)
idx
=
idx
+
1
LOG
(
'Zope'
,
INFO
,
'Successfully rebuilt global product registry'
)
return
1
class
Expired
(
Globals
.
Persistent
):
...
...
@@ -426,7 +444,7 @@ def initialize(app):
get_transaction
().
commit
()
except
:
LOG
(
'Zope'
,
ERROR
,
'A problem was found in the global product registry but '
\
'A problem was found in the global product registry but '
'the attempt to rebuild the registry failed.'
,
error
=
sys
.
exc_info
())
get_transaction
().
abort
()
...
...
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