tests: fix cleanup function
Don't crash when directory to cleanup do not exists.
This commit is contained in:
parent
3075767bb8
commit
d8ff85eee6
@ -865,6 +865,8 @@ class SystemTestCase(QubesTestCase):
|
|||||||
'qubes_templates_dir'):
|
'qubes_templates_dir'):
|
||||||
dirpath = os.path.join(qubes.config.qubes_base_dir,
|
dirpath = os.path.join(qubes.config.qubes_base_dir,
|
||||||
qubes.config.system_path[dirspec])
|
qubes.config.system_path[dirspec])
|
||||||
|
if not os.path.exists(dirpath):
|
||||||
|
continue
|
||||||
for name in os.listdir(dirpath):
|
for name in os.listdir(dirpath):
|
||||||
if name.startswith(prefix):
|
if name.startswith(prefix):
|
||||||
vmnames.add(name)
|
vmnames.add(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user