diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-07-11 10:10:58 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-07-11 10:10:58 +1200 |
commit | e848286988a0b4deababc269f0d232243960285a (patch) | |
tree | e11af901a4a7eec6d0dc9e261f05317c34cc3f0e | |
parent | 0206a7cddd01dca1042e4964c3a5ae7ef1fe9c27 (diff) | |
download | obnam-e848286988a0b4deababc269f0d232243960285a.tar.gz |
Fix SftpFS.chdir to raise OSError, not IOError.
paramiko should use the same exceptions, IMHO, but this
change is a workaround.
-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 689194a8..f9eaaf89 100644 --- a/obnamlib/plugins/sftp_plugin.py +++ b/obnamlib/plugins/sftp_plugin.py @@ -120,7 +120,10 @@ class SftpFS(obnamlib.VirtualFileSystem): return self.sftp.getcwd() def chdir(self, pathname): - self.sftp.chdir(pathname) + try: + self.sftp.chdir(pathname) + except IOError, e: + raise OSError(e.errno, e.strerror, pathname) def listdir(self, pathname): return self.sftp.listdir(pathname) |