core: fix handling disabling VM autostart on VM removal

QubesOS/qubes-issues#1930
This commit is contained in:
Marek Marczykowski-Górecki 2016-06-25 00:19:12 +02:00
parent 376dc43b90
commit 748a3a90a2
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1414,7 +1414,8 @@ class QubesVm(object):
raise
if os.path.exists("/etc/systemd/system/multi-user.target.wants/qubes-vm@" + self.name + ".service"):
subprocess.call(["sudo", "systemctl", "-q", "disable","qubes-vm@" + self.name + ".service"])
retcode = subprocess.call(["sudo", "systemctl", "-q", "disable",
"qubes-vm@" + self.name + ".service"])
if retcode != 0:
raise QubesException("Failed to delete autostart entry for VM")