diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-09-26 04:49:19 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-09-26 04:49:19 +0000 |
commit | 31e19eb5d9eeb840d5405810b8c17f42ff6e742b (patch) | |
tree | f0f56f96ab34b4a2bd187f88a7ccf112eab54e28 /fs/errors.py | |
parent | 092ed491f86e578f089f71b260350e0dd153492c (diff) | |
download | pyfilesystem-31e19eb5d9eeb840d5405810b8c17f42ff6e742b.tar.gz |
convert_os_errors: report path in StorageSpaceError and PermissionDeniedError
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@435 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/errors.py')
-rw-r--r-- | fs/errors.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/errors.py b/fs/errors.py index 661299c..402e92a 100644 --- a/fs/errors.py +++ b/fs/errors.py @@ -227,14 +227,10 @@ def convert_os_errors(func): raise ResourceInvalidError(path,opname=opname,details=e),None,tb if e.errno == errno.EINVAL: raise ResourceInvalidError(path,opname=opname,details=e),None,tb - if e.errno == errno.EOPNOTSUPP: - raise UnsupportedError(opname,details=e),None,tb if e.errno == errno.ENOSPC: - raise StorageSpaceError(opname,details=e),None,tb + raise StorageSpaceError(opname,path=path,details=e),None,tb if e.errno == errno.EPERM: - raise PermissionDeniedError(opname,details=e),None,tb - if e.errno == errno.ENOSYS: - raise UnsupportedError(opname,details=e),None,tb + raise PermissionDeniedError(opname,path=path,details=e),None,tb if e.errno == errno.EACCES: if sys.platform == "win32": if e.args[0] and e.args[0] == 32: @@ -246,6 +242,10 @@ def convert_os_errors(func): raise ResourceInvalidError(path,opname=opname,details=e),None,tb if e.errno == errno.ENAMETOOLONG: raise PathError(path,details=e),None,tb + if e.errno == errno.EOPNOTSUPP: + raise UnsupportedError(opname,details=e),None,tb + if e.errno == errno.ENOSYS: + raise UnsupportedError(opname,details=e),None,tb raise OperationFailedError(opname,details=e),None,tb return wrapper |