diff options
author | Scott Maxwell <scott@codecobblers.com> | 2013-11-19 08:06:35 -0800 |
---|---|---|
committer | Scott Maxwell <scott@codecobblers.com> | 2013-11-19 08:06:35 -0800 |
commit | 25dd096da065b1bc2f35c1a62d8a7055b022818b (patch) | |
tree | 94e87015ebcb83660452c79093e1ac407e360306 /paramiko/sftp_handle.py | |
parent | 3ce336c88b7bfbfad03fab17bff8cb3c3a77176c (diff) | |
download | paramiko-25dd096da065b1bc2f35c1a62d8a7055b022818b.tar.gz |
Change all exceptions to modern format (not Py2.5 compatible)
Diffstat (limited to 'paramiko/sftp_handle.py')
-rw-r--r-- | paramiko/sftp_handle.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/paramiko/sftp_handle.py b/paramiko/sftp_handle.py index 8b78063b..9fc21008 100644 --- a/paramiko/sftp_handle.py +++ b/paramiko/sftp_handle.py @@ -100,8 +100,7 @@ class SFTPHandle (object): readfile.seek(offset) self.__tell = offset data = readfile.read(length) - except IOError: - e = sys.exc_info()[1] + except IOError as e: self.__tell = None return SFTPServer.convert_errno(e.errno) self.__tell += len(data) @@ -140,8 +139,7 @@ class SFTPHandle (object): self.__tell = offset writefile.write(data) writefile.flush() - except IOError: - e = sys.exc_info()[1] + except IOError as e: self.__tell = None return SFTPServer.convert_errno(e.errno) if self.__tell is not None: |