diff options
author | Douglas Turk <dougturk@google.com> | 2012-09-03 14:48:00 +1000 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2012-09-24 18:58:54 -0700 |
commit | 681a465f327a4986c9b7232dd28e2eca7392a6f2 (patch) | |
tree | 99db3412f0563deb0301a4ad0922f6f4b50c86a0 /paramiko/agent.py | |
parent | 7ead8d9c70ab81023e2a0c37e0f3ab7ebf9814af (diff) |
Handle/fix handling of EINTR errors in a few places.
(cherry picked from commit 351bdb72e539c373985e108c89f61839f3acdd2a)
Conflicts:
paramiko/agent.py
paramiko/client.py
paramiko/transport.py
Diffstat (limited to 'paramiko/agent.py')
-rw-r--r-- | paramiko/agent.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paramiko/agent.py b/paramiko/agent.py index 7115f17b..5d04dce8 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -35,6 +35,7 @@ from paramiko.message import Message from paramiko.pkey import PKey from paramiko.channel import Channel from paramiko.common import io_sleep +from paramiko.util import retry_on_signal SSH2_AGENTC_REQUEST_IDENTITIES, SSH2_AGENT_IDENTITIES_ANSWER, \ SSH2_AGENTC_SIGN_REQUEST, SSH2_AGENT_SIGN_RESPONSE = range(11, 15) @@ -202,7 +203,7 @@ class AgentClientProxy(object): if ('SSH_AUTH_SOCK' in os.environ) and (sys.platform != 'win32'): conn = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) try: - conn.connect(os.environ['SSH_AUTH_SOCK']) + retry_on_signal(lambda: conn.connect(os.environ['SSH_AUTH_SOCK'])) except: # probably a dangling env var: the ssh agent is gone return |