diff options
-rw-r--r-- | paramiko/agent.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/agent.py b/paramiko/agent.py index 01bd0252..f928881e 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -113,7 +113,7 @@ class AgentProxyThread(threading.Thread): self.__inr = r self.__addr = addr # This should be an IP address as a string? or None self._agent.connect() - if self._agent._conn is None or not (hasattr(self._agent._conn, 'fileno') or isinstance(self._agent, int)): + if not isinstance(self._agent, int) and (self._agent._conn is None or not hasattr(self._agent._conn, 'fileno')): raise AuthenticationException("Unable to connect to SSH agent") self._communicate() except: |