From 49957971ffb44b41c4a5437e12c24b25da2c98f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Sat, 18 Jan 2020 19:28:44 +0100 Subject: [PATCH] qvm-start-daemon: ensure separate task between GUI/AUDIO --- qubesadmin/tools/qvm_start_daemon.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/qubesadmin/tools/qvm_start_daemon.py b/qubesadmin/tools/qvm_start_daemon.py index 7dbc6e6..e5f7a52 100644 --- a/qubesadmin/tools/qvm_start_daemon.py +++ b/qubesadmin/tools/qvm_start_daemon.py @@ -382,21 +382,17 @@ class DAEMONLauncher: """Handler of 'domain-start' event, starts GUI/AUDIO daemon for actual VM """ try: - if getattr(vm, 'guivm', None) != vm.app.local_name: - return - if not vm.features.check_with_template('gui', True): - return - if kwargs.get('start_guid', 'True') == 'True': + if getattr(vm, 'guivm', None) == vm.app.local_name and \ + vm.features.check_with_template('gui', True) and \ + kwargs.get('start_guid', 'True') == 'True': asyncio.ensure_future(self.start_gui_for_vm(vm)) except qubesadmin.exc.QubesException as e: vm.log.warning('Failed to start GUI for %s: %s', vm.name, str(e)) try: - if getattr(vm, 'audiovm', None) != vm.app.local_name: - return - if not vm.features.check_with_template('audio', True): - return - if kwargs.get('start_audio', 'True') == 'True': + if getattr(vm, 'audiovm', None) == vm.app.local_name and \ + vm.features.check_with_template('audio', True) and \ + kwargs.get('start_audio', 'True') == 'True': asyncio.ensure_future(self.start_audio_for_vm(vm)) except qubesadmin.exc.QubesException as e: vm.log.warning('Failed to start AUDIO for %s: %s', vm.name, str(e))