1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Support different identity file structures

Something to do with vagrant/paramiko versioning.
This commit is contained in:
Ciaran Gultnieks 2014-04-10 13:57:16 +01:00
parent 8fdfc47f84
commit b7420192eb

View File

@ -160,7 +160,9 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
sshs = paramiko.SSHClient()
sshs.set_missing_host_key_policy(paramiko.AutoAddPolicy())
idfile = sshconfig['identityfile']
if idfile.startswith('"') and idfile.endswith('"'):
if isinstance(idfile, list):
idfile = idfile[0]
elif idfile.startswith('"') and idfile.endswith('"'):
idfile = idfile[1:-1]
sshs.connect(sshconfig['hostname'], username=sshconfig['user'],
port=int(sshconfig['port']), timeout=300, look_for_keys=False,