Don't you want an "except ConflictError: raise" here too?
Stefan
On 17. Dez 2004, at 05:39, Chris McDonough wrote:
> 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.
>
> _______________________________________________
> Zope-Checkins maillist - Zope-Checkins@zope.org
> http://mail.zope.org/mailman/listinfo/zope-checkins
>
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is. /Pete McBreen/
_______________________________________________
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders
Stefan
On 17. Dez 2004, at 05:39, Chris McDonough wrote:
> 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.
>
> _______________________________________________
> Zope-Checkins maillist - Zope-Checkins@zope.org
> http://mail.zope.org/mailman/listinfo/zope-checkins
>
--
The time has come to start talking about whether the emperor is as well
dressed as we are supposed to think he is. /Pete McBreen/
_______________________________________________
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders