Skip to content

Commit

Permalink
tests: fix cleanup before test
Browse files Browse the repository at this point in the history
If any test-* VMs remains from previous test run, there are removed
before test. self.app doesn't exist at this point, so don't require it
in self.remove_vms().

(cherry picked from commit 534de9b)
  • Loading branch information
marmarek committed Apr 18, 2020
1 parent debe747 commit d27650e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qubes/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def remove_vms(self, vms):
# workaround for https://phabricator.whonix.org/T930
# unregister all the VMs from sys-whonix, otherwise it will start them
# again (possibly in further test)
if 'whonix' in self.app.default_netvm.name:
if hasattr(self, 'app') and 'whonix' in self.app.default_netvm.name:
for vm in vms:
try:
self.loop.run_until_complete(
Expand Down

0 comments on commit d27650e

Please sign in to comment.