On Tue, 12 Sep 2006 16:09:33 -0600, Wilfredo Sanchez
Author: wsanchez Date: Tue Sep 12 16:09:31 2006 New Revision: 18104
Modified: trunk/twisted/web2/dav/http.py Log: Some systems raise an OSError with EPERM rather than an IOError with EACCES for filesystem permissions errors. Submitted by rfmohr@osc.edu Reviewed by wsanchez Fixes #1807
Modified: trunk/twisted/web2/dav/http.py ============================================================================== --- trunk/twisted/web2/dav/http.py (original) +++ trunk/twisted/web2/dav/http.py Tue Sep 12 16:09:31 2006 @@ -262,9 +262,9 @@ if what is not None: log.msg("%s while %s" % (err, what))
- if failure.check(IOError): + if failure.check(IOError, OSError): e = failure.value[0] - if e == errno.EACCES: + if e == errno.EACCES or e == errno.EPERM: msg("Permission denied") return responsecode.FORBIDDEN elif e == errno.ENOSPC:
Tests? Jean-Paul