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/proxy.py | |
parent | 3ce336c88b7bfbfad03fab17bff8cb3c3a77176c (diff) | |
download | paramiko-25dd096da065b1bc2f35c1a62d8a7055b022818b.tar.gz |
Change all exceptions to modern format (not Py2.5 compatible)
Diffstat (limited to 'paramiko/proxy.py')
-rw-r--r-- | paramiko/proxy.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py index 43c46665..72927c04 100644 --- a/paramiko/proxy.py +++ b/paramiko/proxy.py @@ -60,8 +60,7 @@ class ProxyCommand(object): """ try: self.process.stdin.write(content) - except IOError: - e = sys.exc_info()[1] + except IOError as e: # There was a problem with the child process. It probably # died and we can't proceed. The best option here is to # raise an exception informing the user that the informed @@ -81,8 +80,7 @@ class ProxyCommand(object): """ try: return os.read(self.process.stdout.fileno(), size) - except IOError: - e = sys.exc_info()[1] + except IOError as e: raise ProxyCommandFailure(' '.join(self.cmd), e.strerror) def close(self): |