chiark / gitweb /
Switch back to paramiko for all modules
authorCiaran Gultnieks <ciaran@ciarang.com>
Thu, 3 Apr 2014 16:14:59 +0000 (17:14 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Thu, 3 Apr 2014 16:14:59 +0000 (17:14 +0100)
fdroidserver/build.py

index 12c5ec77af8aed72566a6774890da68e410e2d3c..c5842e673cd6c4fb89680615430eda5f4d82d1f4 100644 (file)
@@ -80,11 +80,11 @@ def vagrant(params, cwd=None, printout=False):
 def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
     """Do a build on the build server."""
 
-    import ssh
+    import paramiko
     if options.verbose:
-        logging.getLogger("ssh").setLevel(logging.DEBUG)
+        logging.getLogger("paramiko").setLevel(logging.DEBUG)
     else:
-        logging.getLogger("ssh").setLevel(logging.WARN)
+        logging.getLogger("paramiko").setLevel(logging.WARN)
 
     # Reset existing builder machine to a clean state if possible.
     vm_ok = False
@@ -152,13 +152,13 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
                 cwd='builder', shell=True) != 0:
             raise BuildException("Error getting ssh config")
         vagranthost = 'default' # Host in ssh config file
-        sshconfig = ssh.SSHConfig()
+        sshconfig = paramiko.SSHConfig()
         sshf = open('builder/sshconfig', 'r')
         sshconfig.parse(sshf)
         sshf.close()
         sshconfig = sshconfig.lookup(vagranthost)
-        sshs = ssh.SSHClient()
-        sshs.set_missing_host_key_policy(ssh.AutoAddPolicy())
+        sshs = paramiko.SSHClient()
+        sshs.set_missing_host_key_policy(paramiko.AutoAddPolicy())
         idfile = sshconfig['identityfile']
         if idfile.startswith('"') and idfile.endswith('"'):
             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
 
         # Load and parse the SSH config...
-        sshconfig = ssh.SSHConfig()
+        sshconfig = paramiko.SSHConfig()
         sshf = open('builder/sshconfig', 'r')
         sshconfig.parse(sshf)
         sshf.close()
@@ -208,9 +208,9 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
 
         # Open SSH connection...
         logging.info("Connecting to virtual machine...")
-        sshs = ssh.SSHClient()
-        sshs.set_missing_host_key_policy(ssh.AutoAddPolicy())
-        idfile = sshconfig['identityfile']
+        sshs = paramiko.SSHClient()
+        sshs.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+        idfile = sshconfig['identityfile'][0]
         if idfile.startswith('"') and idfile.endswith('"'):
             idfile = idfile[1:-1]
         sshs.connect(sshconfig['hostname'], username=sshconfig['user'],