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
04332818
Commit
04332818
authored
Jul 03, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Python's current `raise` syntax
parent
92e41a53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/OFS/Application.py
src/OFS/Application.py
+5
-5
No files found.
src/OFS/Application.py
View file @
04332818
...
...
@@ -105,8 +105,8 @@ class Application(ApplicationDefaultPermissions,
def
Redirect
(
self
,
destination
,
URL1
):
"""Utility function to allow user-controlled redirects"""
if
destination
.
find
(
'//'
)
>=
0
:
raise
RedirectException
,
destination
raise
RedirectException
,
(
"%s/%s"
%
(
URL1
,
destination
))
raise
RedirectException
(
destination
)
raise
RedirectException
(
"%s/%s"
%
(
URL1
,
destination
))
ZopeRedirect
=
Redirect
...
...
@@ -132,7 +132,7 @@ class Application(ApplicationDefaultPermissions,
try
:
REQUEST
.
RESPONSE
.
notFoundError
(
"%s
\
n
%s"
%
(
name
,
method
))
except
AttributeError
:
raise
KeyError
,
name
raise
KeyError
(
name
)
def
ZopeTime
(
self
,
*
args
):
"""Utility function to return current date/time"""
...
...
@@ -141,12 +141,12 @@ class Application(ApplicationDefaultPermissions,
def
DELETE
(
self
,
REQUEST
,
RESPONSE
):
"""Delete a resource object."""
self
.
dav__init
(
REQUEST
,
RESPONSE
)
raise
Forbidden
,
'This resource cannot be deleted.'
raise
Forbidden
(
'This resource cannot be deleted.'
)
def
MOVE
(
self
,
REQUEST
,
RESPONSE
):
"""Move a resource to a new location."""
self
.
dav__init
(
REQUEST
,
RESPONSE
)
raise
Forbidden
,
'This resource cannot be moved.'
raise
Forbidden
(
'This resource cannot be moved.'
)
def
absolute_url
(
self
,
relative
=
0
):
"""The absolute URL of the root object is BASE1 or "/".
...
...
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