tools: don't fail qvm-template-postprocess on shutdown race condition
It may happen that shutdown timeout expires at exact time that template has stopped.
This commit is contained in:
parent
0caf6f735d
commit
b359f9ca5e
@ -185,7 +185,10 @@ def call_postinstall_service(vm):
|
|||||||
yield from asyncio.sleep(1)
|
yield from asyncio.sleep(1)
|
||||||
timeout -= 1
|
timeout -= 1
|
||||||
if not vm.is_halted():
|
if not vm.is_halted():
|
||||||
vm.kill()
|
try:
|
||||||
|
vm.kill()
|
||||||
|
except qubesadmin.exc.QubesVMNotStartedError:
|
||||||
|
pass
|
||||||
finally:
|
finally:
|
||||||
vm.netvm = qubesadmin.DEFAULT
|
vm.netvm = qubesadmin.DEFAULT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user