vm/dispvm: fix dispvm.cleanup() when no service was called

In such a case (especially when running in dom0) there is nothing to
cleanup.

Fixes QubesOS/qubes-issues#3016
This commit is contained in:
Marek Marczykowski-Górecki 2017-08-12 15:15:06 +02:00
parent 596eb3d96c
commit 3d2d3a2974
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -371,7 +371,8 @@ class DispVMWrapper(QubesVM):
'''Cleanup after DispVM usage'''
# in 'remote' case nothing is needed, as DispVM is cleaned up
# automatically
if self.app.qubesd_connection_type == 'socket':
if self.app.qubesd_connection_type == 'socket' and \
not self._method_dest.startswith('$dispvm'):
try:
self.kill()
except qubesadmin.exc.QubesVMNotRunningError: