[Zope-Checkins] CVS: Packages/webdav - NullResource.py:1.39.62.4
Chris McDonough
chrism at plope.com
Thu Dec 16 23:39:30 EST 2004
Update of /cvs-repository/Packages/webdav
In directory cvs.zope.org:/tmp/cvs-serv16313
Modified Files:
Tag: Zope-2_7-branch
NullResource.py
Log Message:
Don't raise Forbidden when we don't know what else to do. Instead, let the real error propagate but catch CopyError, which really means Unauthorized in this case.
=== Packages/webdav/NullResource.py 1.39.62.3 => 1.39.62.4 ===
--- Packages/webdav/NullResource.py:1.39.62.3 Wed Dec 1 18:01:48 2004
+++ Packages/webdav/NullResource.py Thu Dec 16 23:39:30 2004
@@ -28,6 +28,7 @@
from zExceptions import MethodNotAllowed
from common import isDavCollection
from common import Locked, Conflict, PreconditionFailed, UnsupportedMediaType
+from OFS.CopySupport import CopyError
class NullResource(Persistent, Acquisition.Implicit, Resource):
"""Null resources are used to handle HTTP method calls on
@@ -143,10 +144,8 @@
# check the clipboard.
try:
parent._verifyObjectPaste(ob.__of__(parent), 0)
- except Unauthorized:
- raise
- except:
- raise Forbidden, sys.exc_info()[1]
+ except CopyError:
+ raise Unauthorized, sys.exc_info()[1]
# Delegate actual PUT handling to the new object,
# SDS: But just *after* it has been stored.
More information about the Zope-Checkins
mailing list