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
28f29df6
Commit
28f29df6
authored
Mar 21, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup; try to reduce the amount of confusing code here.
parent
b4c7a375
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+7
-10
No files found.
lib/python/ZPublisher/Publish.py
View file @
28f29df6
...
...
@@ -12,8 +12,8 @@
##############################################################################
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.16
2 2003/03/21 21:20:10
fdrake Exp $"""
__version__
=
'$Revision: 1.16
2
$'
[
11
:
-
2
]
$Id: Publish.py,v 1.16
3 2003/03/21 22:00:56
fdrake Exp $"""
__version__
=
'$Revision: 1.16
3
$'
[
11
:
-
2
]
import
sys
,
os
from
Response
import
Response
...
...
@@ -163,7 +163,7 @@ def publish_module(module_name,
must_die
=
sys
.
exc_info
()
request
.
response
.
exception
(
must_die
)
except
ImportError
,
v
:
if
type
(
v
)
is
type
(()
)
and
len
(
v
)
==
3
:
must_die
=
v
if
isinstance
(
v
,
tuple
)
and
len
(
v
)
==
3
:
must_die
=
v
elif
hasattr
(
sys
,
'exc_info'
):
must_die
=
sys
.
exc_info
()
else
:
must_die
=
SystemExit
,
v
,
sys
.
exc_info
()[
2
]
request
.
response
.
exception
(
1
,
v
)
...
...
@@ -214,9 +214,10 @@ def get_module_info(module_name, modules={},
acquire
()
tb
=
None
g
=
globals
()
try
:
try
:
module
=
__import__
(
module_name
,
g
lobals
(),
globals
()
,
(
'__doc__'
,))
module
=
__import__
(
module_name
,
g
,
g
,
(
'__doc__'
,))
# Let the app specify a realm
if
hasattr
(
module
,
'__bobo_realm__'
):
...
...
@@ -243,12 +244,8 @@ def get_module_info(module_name, modules={},
debug_mode
=
1
if
hasattr
(
module
,
'__bobo_before__'
):
bobo_before
=
module
.
__bobo_before__
else
:
bobo_before
=
None
if
hasattr
(
module
,
'__bobo_after__'
):
bobo_after
=
module
.
__bobo_after__
else
:
bobo_after
=
None
bobo_before
=
getattr
(
module
,
"__bobo_before__"
,
None
)
bobo_after
=
getattr
(
module
,
"__bobo_after__"
,
None
)
if
hasattr
(
module
,
'bobo_application'
):
object
=
module
.
bobo_application
...
...
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