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
ba1b66f8
Commit
ba1b66f8
authored
Jan 08, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zLOG -> logging
parent
a6fb6824
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
lib/python/ZPublisher/BeforeTraverse.py
lib/python/ZPublisher/BeforeTraverse.py
+8
-8
No files found.
lib/python/ZPublisher/BeforeTraverse.py
View file @
ba1b66f8
...
...
@@ -15,11 +15,13 @@ __version__='$Revision: 1.12 $'[11:-2]
"""BeforeTraverse interface and helper classes"""
from
Acquisition
import
aq_base
from
zLOG
import
LOG
,
ERROR
from
logging
import
getLogger
import
sys
# Interface
LOG
=
getLogger
(
'ZPublisher'
)
def
registerBeforeTraverse
(
container
,
object
,
app_handle
,
priority
=
99
):
"""Register an object to be called before a container is traversed.
...
...
@@ -103,8 +105,8 @@ class MultiHook:
try
:
cob
(
container
,
request
)
except
TypeError
:
LOG
(
'MultiHook'
,
ERROR
,
'%s call %s failed.'
%
(
`self._hookname`
,
`cob`
),
e
rror
=
sys
.
exc_info
())
LOG
.
error
(
'%s call %s failed.'
%
(
`self._hookname`
,
`cob`
),
e
xc_info
=
sys
.
exc_info
())
def
add
(
self
,
cob
):
self
.
_list
.
append
(
cob
)
...
...
@@ -149,8 +151,6 @@ class NameCaller:
# Only catch exceptions that are likely to be logic errors.
# We shouldn't catch Redirects, Unauthorizeds, etc. since
# the programmer may want to raise them deliberately.
from
zLOG
import
LOG
,
ERROR
import
sys
LOG
(
'BeforeTraverse'
,
ERROR
,
'Error while invoking hook: "%s"'
%
self
.
name
,
error
=
sys
.
exc_info
())
LOG
.
error
(
'BeforeTraverse: Error while invoking hook: "%s"'
%
self
.
name
,
exc_info
=
sys
.
exc_info
())
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