summaryrefslogtreecommitdiff
path: root/paramiko/auth_handler.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-06-06 14:05:08 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-06-06 14:05:22 -0700
commit13e9e397e04a68c6425a05e4ffb66f96077b026a (patch)
tree4d3b55c0263867ad2909a52edff3d76ce15c629a /paramiko/auth_handler.py
parentf0372ad11cc59e2b750fc3a3252f5ee3458ce623 (diff)
downloadparamiko-13e9e397e04a68c6425a05e4ffb66f96077b026a.tar.gz
flake8/whitespace
Diffstat (limited to 'paramiko/auth_handler.py')
-rw-r--r--paramiko/auth_handler.py6
1 files changed, 4 insertions, 2 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():