summaryrefslogtreecommitdiff
path: root/paramiko/proxy.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-10-30 16:46:33 -0700
committerScott Maxwell <scott@codecobblers.com>2013-10-30 16:46:33 -0700
commit2ea352b8baf1037bd22fc79146ef646c163a7692 (patch)
tree439892d24b7659bb4345790af09582aaa0162377 /paramiko/proxy.py
parent6bd1e42b43017c8df3edd826fad5aca798538b10 (diff)
downloadparamiko-2ea352b8baf1037bd22fc79146ef646c163a7692.tar.gz
Fix dict iters, sorts, exceptions, bytes renames and tuple args
Diffstat (limited to 'paramiko/proxy.py')
-rw-r--r--paramiko/proxy.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/paramiko/proxy.py b/paramiko/proxy.py
index a10feb01..43c46665 100644
--- a/paramiko/proxy.py
+++ b/paramiko/proxy.py
@@ -60,12 +60,13 @@ class ProxyCommand(object):
"""
try:
self.process.stdin.write(content)
- except IOError, e:
+ except IOError:
+ e = sys.exc_info()[1]
# 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
# ProxyCommand is not working.
- raise BadProxyCommand(' '.join(self.cmd), e.strerror)
+ raise ProxyCommandFailure(' '.join(self.cmd), e.strerror)
return len(content)
def recv(self, size):
@@ -80,8 +81,9 @@ class ProxyCommand(object):
"""
try:
return os.read(self.process.stdout.fileno(), size)
- except IOError, e:
- raise BadProxyCommand(' '.join(self.cmd), e.strerror)
+ except IOError:
+ e = sys.exc_info()[1]
+ raise ProxyCommandFailure(' '.join(self.cmd), e.strerror)
def close(self):
os.kill(self.process.pid, signal.SIGTERM)