diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-06-06 14:05:08 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-06-06 14:05:22 -0700 |
commit | 13e9e397e04a68c6425a05e4ffb66f96077b026a (patch) | |
tree | 4d3b55c0263867ad2909a52edff3d76ce15c629a | |
parent | f0372ad11cc59e2b750fc3a3252f5ee3458ce623 (diff) |
flake8/whitespace
-rw-r--r-- | paramiko/auth_handler.py | 6 | ||||
-rw-r--r-- | paramiko/transport.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py index 6131db3f..ae88179e 100644 --- a/paramiko/auth_handler.py +++ b/paramiko/auth_handler.py @@ -22,6 +22,7 @@ import weakref import time + from paramiko.common import ( cMSG_SERVICE_REQUEST, cMSG_DISCONNECT, DISCONNECT_SERVICE_NOT_AVAILABLE, DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE, cMSG_USERAUTH_REQUEST, @@ -36,7 +37,6 @@ from paramiko.common import ( MSG_USERAUTH_GSSAPI_TOKEN, MSG_USERAUTH_GSSAPI_ERROR, MSG_USERAUTH_GSSAPI_ERRTOK, MSG_USERAUTH_GSSAPI_MIC, MSG_NAMES, ) - from paramiko.message import Message from paramiko.py3compat import bytestring from paramiko.ssh_exception import ( @@ -191,7 +191,9 @@ class AuthHandler (object): return m.asbytes() def wait_for_response(self, event): - max_ts = time.time() + self.transport.auth_timeout if self.transport.auth_timeout is not None else None + max_ts = None + if self.transport.auth_timeout is not None: + max_ts = time.time() + self.transport.auth_timeout while True: event.wait(0.1) if not self.transport.is_active(): diff --git a/paramiko/transport.py b/paramiko/transport.py index 998212a2..e5218da4 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -398,7 +398,7 @@ class Transport(threading.Thread, ClosingContextManager): # banner sent. self.handshake_timeout = 15 # how long (seconds) to wait for the auth response. - self.auth_timeout = 30 + self.auth_timeout = 30 # server mode: self.server_mode = False |