chiark / gitweb /
Handle half-built and abandoned vms better
authorCiaran Gultnieks <ciaran@ciarang.com>
Tue, 4 Jun 2013 21:41:39 +0000 (22:41 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Tue, 4 Jun 2013 21:41:39 +0000 (22:41 +0100)
fdroidserver/build.py

index f6efa6d71a60669ebdc51b654bcbe3c99aff6c61..974c2b4e1c4c81800e58c6268d8d9ef483448ea9 100644 (file)
@@ -49,8 +49,9 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
     vm_ok = False
     if not options.resetserver:
         print "Checking for valid existing build server"
-        if os.path.exists(os.path.join('builder', 'Vagrantfile')):
-            print "...directory exists"
+        if (os.path.exists(os.path.join('builder', 'Vagrantfile')) and 
+                os.path.exists(os.path.join('builder', '.vagrant'))):
+            print "...VM is present"
             p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'list', '--details'],
                 cwd='builder', stdout=subprocess.PIPE)
             output = p.communicate()[0]