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
5a38c6e8
Commit
5a38c6e8
authored
May 23, 2004
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat whitespace in preparation for a real change.
parent
92a1f1b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
lib/python/ZPublisher/Publish.py
lib/python/ZPublisher/Publish.py
+17
-10
No files found.
lib/python/ZPublisher/Publish.py
View file @
5a38c6e8
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
__doc__
=
"""Python Object Publisher -- Publish Python objects on web servers
$Id$"""
$Id$"""
__version__
=
'$Revision: 1.167 $'
[
11
:
-
2
]
import
sys
,
os
import
sys
,
os
from
Response
import
Response
from
Response
import
Response
...
@@ -85,7 +84,8 @@ def publish(request, module_name, after_list, debug=0,
...
@@ -85,7 +84,8 @@ def publish(request, module_name, after_list, debug=0,
raise
Redirect
,
cancel
raise
Redirect
,
cancel
after_list
[
0
]
=
bobo_after
after_list
[
0
]
=
bobo_after
if
debug_mode
:
response
.
debug_mode
=
debug_mode
if
debug_mode
:
response
.
debug_mode
=
debug_mode
if
realm
and
not
request
.
get
(
'REMOTE_USER'
,
None
):
if
realm
and
not
request
.
get
(
'REMOTE_USER'
,
None
):
response
.
realm
=
realm
response
.
realm
=
realm
...
@@ -97,7 +97,8 @@ def publish(request, module_name, after_list, debug=0,
...
@@ -97,7 +97,8 @@ def publish(request, module_name, after_list, debug=0,
request
[
'PARENTS'
]
=
parents
=
[
object
]
request
[
'PARENTS'
]
=
parents
=
[
object
]
if
transactions_manager
:
transactions_manager
.
begin
()
if
transactions_manager
:
transactions_manager
.
begin
()
object
=
request
.
traverse
(
path
,
validated_hook
=
validated_hook
)
object
=
request
.
traverse
(
path
,
validated_hook
=
validated_hook
)
...
@@ -110,13 +111,16 @@ def publish(request, module_name, after_list, debug=0,
...
@@ -110,13 +111,16 @@ def publish(request, module_name, after_list, debug=0,
dont_publish_class
,
dont_publish_class
,
request
,
bind
=
1
)
request
,
bind
=
1
)
if
result
is
not
response
:
response
.
setBody
(
result
)
if
result
is
not
response
:
response
.
setBody
(
result
)
if
transactions_manager
:
transactions_manager
.
commit
()
if
transactions_manager
:
transactions_manager
.
commit
()
return
response
return
response
except
:
except
:
if
transactions_manager
:
transactions_manager
.
abort
()
if
transactions_manager
:
transactions_manager
.
abort
()
# DM: provide nicer error message for FTP
# DM: provide nicer error message for FTP
sm
=
None
sm
=
None
...
@@ -126,11 +130,13 @@ def publish(request, module_name, after_list, debug=0,
...
@@ -126,11 +130,13 @@ def publish(request, module_name, after_list, debug=0,
if
sm
is
not
None
:
if
sm
is
not
None
:
from
asyncore
import
compact_traceback
from
asyncore
import
compact_traceback
cl
,
val
=
sys
.
exc_info
()[:
2
]
cl
,
val
=
sys
.
exc_info
()[:
2
]
sm
(
'%s: %s %s'
%
(
getattr
(
cl
,
'__name__'
,
cl
),
val
,
debug_mode
and
compact_traceback
()[
-
1
]
or
''
))
sm
(
'%s: %s %s'
%
(
getattr
(
cl
,
'__name__'
,
cl
),
val
,
debug_mode
and
compact_traceback
()[
-
1
]
or
''
))
if
err_hook
is
not
None
:
if
err_hook
is
not
None
:
if
parents
:
parents
=
parents
[
0
]
if
parents
:
parents
=
parents
[
0
]
try
:
try
:
return
err_hook
(
parents
,
request
,
return
err_hook
(
parents
,
request
,
sys
.
exc_info
()[
0
],
sys
.
exc_info
()[
0
],
...
@@ -152,7 +158,8 @@ def publish(request, module_name, after_list, debug=0,
...
@@ -152,7 +158,8 @@ def publish(request, module_name, after_list, debug=0,
finally
:
finally
:
newrequest
.
close
()
newrequest
.
close
()
else
:
raise
else
:
raise
def
publish_module_standard
(
module_name
,
def
publish_module_standard
(
module_name
,
...
...
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