automatically retry connect with allow_agent=False
This seems to be a common reason a connect failure happens. Explicitly trying again with allow_agent=False may make it work. Change-Id: If14a9f9eb0d6f707e4f939cb96ab5f6c4844a541
This commit is contained in:
parent
e83704eb62
commit
6687a12e4e
@ -88,8 +88,13 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False, stable='',
|
||||
|
||||
if not changes:
|
||||
while True:
|
||||
client.connect(server, port=29418,
|
||||
key_filename=ssh_key, username=ssh_user)
|
||||
try:
|
||||
client.connect(server, port=29418,
|
||||
key_filename=ssh_key, username=ssh_user)
|
||||
except paramiko.SSHException:
|
||||
client.connect(server, port=29418,
|
||||
key_filename=ssh_key, username=ssh_user,
|
||||
allow_agent=False)
|
||||
cmd = ('gerrit query %s --all-approvals --patch-sets '
|
||||
'--format JSON' % projects_q(project))
|
||||
if only_open:
|
||||
|
Loading…
Reference in New Issue
Block a user