Commit 6c6e44a1 by rfkelly0

ENONET missing on win32; use ENETDOWN instead (closed issue #38)

parent 07499b3e
...@@ -196,7 +196,7 @@ def convert_fs_errors(func): ...@@ -196,7 +196,7 @@ def convert_fs_errors(func):
except StorageSpaceError, e: except StorageSpaceError, e:
raise OSError(errno.ENOSPC,str(e)) raise OSError(errno.ENOSPC,str(e))
except RemoteConnectionError, e: except RemoteConnectionError, e:
raise OSError(errno.ENONET,str(e)) raise OSError(errno.ENETDOWN,str(e))
except UnsupportedError, e: except UnsupportedError, e:
raise OSError(errno.ENOSYS,str(e)) raise OSError(errno.ENOSYS,str(e))
except FSError, e: except FSError, e:
...@@ -242,6 +242,8 @@ def convert_os_errors(func): ...@@ -242,6 +242,8 @@ def convert_os_errors(func):
raise PermissionDeniedError(opname,path=path,details=e),None,tb raise PermissionDeniedError(opname,path=path,details=e),None,tb
if e.errno == errno.ENONET: if e.errno == errno.ENONET:
raise RemoteConnectionError(opname,path=path,details=e),None,tb raise RemoteConnectionError(opname,path=path,details=e),None,tb
if e.errno == errno.ENETDOWN:
raise RemoteConnectionError(opname,path=path,details=e),None,tb
if e.errno == errno.EACCES: if e.errno == errno.EACCES:
if sys.platform == "win32": if sys.platform == "win32":
if e.args[0] and e.args[0] == 32: if e.args[0] and e.args[0] == 32:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment