summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew <andrew@poundpay.com>2012-08-02 13:03:14 -0700
committerJeff Forcier <jeff@bitprophet.org>2012-09-23 16:46:07 -0700
commitb592eb1074bb158643bccfef45c2d47c0233f93f (patch)
tree63fc9e3ca6d3afc1d8ad59278934a5098d5ed347
parent33176b90f797a59340eb29434adff0d1af884dd9 (diff)
make sure to break out of key auth loop on success when doing 2-factor
(cherry picked from commit 0a4aa8a9d119022adef3b8d89f129ea26110fc1a)
-rw-r--r--paramiko/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index b10a7867..a142c0e9 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -455,6 +455,7 @@ class SSHClient (object):
if not remaining_auth_types:
return
two_factor = True
+ break
except SSHException, e:
saved_exception = e
else:
@@ -485,6 +486,7 @@ class SSHClient (object):
if not remaining_auth_types:
return
two_factor = True
+ break
except SSHException, e:
saved_exception = e
except IOError, e: