Skip to content

Commit

Permalink
qvm-start-daemon: fix remaining process on new audiovm
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed Apr 26, 2024
1 parent afc583d commit 118dc83
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions qubesadmin/tools/qvm_start_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,8 @@ def on_property_audiovm_set(self, vm, _event, **_kwargs):
log.error("vm.name: failed to determine XID: %s", str(e))
return
xid, stubdom_xid = self.xid_cache[vm.name]
oldvalue = _kwargs.get("oldvalue", None)
newvalue = _kwargs.get("newvalue", None)
if oldvalue == self.app.local_name and newvalue == "None":
if newvalue != self.app.local_name:
if xid != -1:
self.cleanup_pacat_process(xid)
if stubdom_xid != -1:
Expand All @@ -757,10 +756,9 @@ def on_property_audiovm_set(self, vm, _event, **_kwargs):
del self.xid_cache[vm.name]
except KeyError:
return
elif newvalue == self.app.local_name:
power_state = vm.get_power_state()
if power_state == 'Running':
asyncio.ensure_future(self.start_audio(vm))
elif (newvalue == self.app.local_name and

Check warning on line 759 in qubesadmin/tools/qvm_start_daemon.py

View check run for this annotation

Codecov / codecov/patch

qubesadmin/tools/qvm_start_daemon.py#L741-L759

Added lines #L741 - L759 were not covered by tests
vm.get_power_state() == "Running"):
asyncio.ensure_future(self.start_audio(vm))

Check warning on line 761 in qubesadmin/tools/qvm_start_daemon.py

View check run for this annotation

Codecov / codecov/patch

qubesadmin/tools/qvm_start_daemon.py#L761

Added line #L761 was not covered by tests

def cleanup_guid(self, xid):
"""
Expand Down

0 comments on commit 118dc83

Please sign in to comment.