fix snapshot path to be os agnostic

This commit is contained in:
Daan Spitz
2017-07-12 13:50:43 +02:00
parent de2fa852b2
commit ecfb4db363
+1 -1
View File
@@ -146,7 +146,7 @@ class QEMU(Machinery):
snapshot_path = vm_options.image
else:
snapshot_name = "snapshot_" + vm_info.name
snapshot_path = os.path.join(os.path.dirname(vm_options.image), snapshot_name) + ".qcow2"
snapshot_path = "%s/%s" % (os.path.dirname(vm_options.image), os.path.basename(snapshot_name)) + ".qcow2"
if os.path.exists(snapshot_path):
os.remove(snapshot_path)