diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-07-11 10:27:12 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-07-11 10:27:12 +1200 |
commit | 7d31bc7228944650a9e89f8ef42f3b0b3f9c8f37 (patch) | |
tree | 54e3248b34f1546d99cd54208c08ab5d0e841124 | |
parent | 9345ad197fbb8006a340bf3fd4cb63e09fe17067 (diff) | |
download | obnam-7d31bc7228944650a9e89f8ef42f3b0b3f9c8f37.tar.gz |
Fix SftpFS.rmdir to translate paramiko's IOError to OSError.
-rw-r--r-- | obnamlib/plugins/sftp_plugin.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/obnamlib/plugins/sftp_plugin.py b/obnamlib/plugins/sftp_plugin.py index 1f7dceed..dbce9b6d 100644 --- a/obnamlib/plugins/sftp_plugin.py +++ b/obnamlib/plugins/sftp_plugin.py @@ -178,7 +178,10 @@ class SftpFS(obnamlib.VirtualFileSystem): self.mkdir(pathname) def rmdir(self, pathname): - self.sftp.rmdir(pathname) + try: + self.sftp.rmdir(pathname) + except IOError, e: + raise OSError(e.errno, e.strerror, pathname) def remove(self, pathname): self.sftp.remove(pathname) |