tests/backup: fix handling different VM types
Not all VM types have 'template' property.
This commit is contained in:
parent
460f0849a7
commit
dd93650ea7
@ -55,6 +55,8 @@ class TC_00_Backup(qubes.tests.BackupTestsMixin, qubes.tests.QubesTestCase):
|
|||||||
"VM {} - property {} not properly restored".format(
|
"VM {} - property {} not properly restored".format(
|
||||||
vm.name, prop))
|
vm.name, prop))
|
||||||
for prop in ('netvm', 'template', 'label'):
|
for prop in ('netvm', 'template', 'label'):
|
||||||
|
if not hasattr(vm, prop):
|
||||||
|
continue
|
||||||
orig_value = getattr(vm, prop)
|
orig_value = getattr(vm, prop)
|
||||||
restored_value = getattr(restored_vm, prop)
|
restored_value = getattr(restored_vm, prop)
|
||||||
if orig_value and restored_value:
|
if orig_value and restored_value:
|
||||||
|
Loading…
Reference in New Issue
Block a user