mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Switch back to paramiko for all modules
This commit is contained in:
parent
c08987cf4b
commit
c353a69231
1 changed files with 10 additions and 10 deletions
|
|
@ -80,11 +80,11 @@ def vagrant(params, cwd=None, printout=False):
|
||||||
def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
"""Do a build on the build server."""
|
"""Do a build on the build server."""
|
||||||
|
|
||||||
import ssh
|
import paramiko
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
logging.getLogger("ssh").setLevel(logging.DEBUG)
|
logging.getLogger("paramiko").setLevel(logging.DEBUG)
|
||||||
else:
|
else:
|
||||||
logging.getLogger("ssh").setLevel(logging.WARN)
|
logging.getLogger("paramiko").setLevel(logging.WARN)
|
||||||
|
|
||||||
# Reset existing builder machine to a clean state if possible.
|
# Reset existing builder machine to a clean state if possible.
|
||||||
vm_ok = False
|
vm_ok = False
|
||||||
|
|
@ -152,13 +152,13 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
cwd='builder', shell=True) != 0:
|
cwd='builder', shell=True) != 0:
|
||||||
raise BuildException("Error getting ssh config")
|
raise BuildException("Error getting ssh config")
|
||||||
vagranthost = 'default' # Host in ssh config file
|
vagranthost = 'default' # Host in ssh config file
|
||||||
sshconfig = ssh.SSHConfig()
|
sshconfig = paramiko.SSHConfig()
|
||||||
sshf = open('builder/sshconfig', 'r')
|
sshf = open('builder/sshconfig', 'r')
|
||||||
sshconfig.parse(sshf)
|
sshconfig.parse(sshf)
|
||||||
sshf.close()
|
sshf.close()
|
||||||
sshconfig = sshconfig.lookup(vagranthost)
|
sshconfig = sshconfig.lookup(vagranthost)
|
||||||
sshs = ssh.SSHClient()
|
sshs = paramiko.SSHClient()
|
||||||
sshs.set_missing_host_key_policy(ssh.AutoAddPolicy())
|
sshs.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
idfile = sshconfig['identityfile']
|
idfile = sshconfig['identityfile']
|
||||||
if idfile.startswith('"') and idfile.endswith('"'):
|
if idfile.startswith('"') and idfile.endswith('"'):
|
||||||
idfile = idfile[1:-1]
|
idfile = idfile[1:-1]
|
||||||
|
|
@ -200,7 +200,7 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
vagranthost = 'default' # Host in ssh config file
|
vagranthost = 'default' # Host in ssh config file
|
||||||
|
|
||||||
# Load and parse the SSH config...
|
# Load and parse the SSH config...
|
||||||
sshconfig = ssh.SSHConfig()
|
sshconfig = paramiko.SSHConfig()
|
||||||
sshf = open('builder/sshconfig', 'r')
|
sshf = open('builder/sshconfig', 'r')
|
||||||
sshconfig.parse(sshf)
|
sshconfig.parse(sshf)
|
||||||
sshf.close()
|
sshf.close()
|
||||||
|
|
@ -208,9 +208,9 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||||
|
|
||||||
# Open SSH connection...
|
# Open SSH connection...
|
||||||
logging.info("Connecting to virtual machine...")
|
logging.info("Connecting to virtual machine...")
|
||||||
sshs = ssh.SSHClient()
|
sshs = paramiko.SSHClient()
|
||||||
sshs.set_missing_host_key_policy(ssh.AutoAddPolicy())
|
sshs.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
idfile = sshconfig['identityfile']
|
idfile = sshconfig['identityfile'][0]
|
||||||
if idfile.startswith('"') and idfile.endswith('"'):
|
if idfile.startswith('"') and idfile.endswith('"'):
|
||||||
idfile = idfile[1:-1]
|
idfile = idfile[1:-1]
|
||||||
sshs.connect(sshconfig['hostname'], username=sshconfig['user'],
|
sshs.connect(sshconfig['hostname'], username=sshconfig['user'],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue