1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

delete .vagrant dir when cleaning up buildserver vm

This commit is contained in:
Michael Pöhn 2017-03-24 03:15:35 +01:00 committed by Hans-Christoph Steiner
parent 437ff7c3f0
commit 8cfd3ca770

View File

@ -304,6 +304,12 @@ def destroy_current_image(v, serverdir):
v.destroy()
elif options.verbose:
print('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!')
try:
shutil.rmtree(os.path.join(serverdir, '.vagrant'))
except Exception as e:
print("could not delete vagrant dir: %s, %s" % (os.path.join(serverdir, '.vagrant'), e))
if config['vm_provider'] == 'libvirt':
import libvirt
try: