backup: Do not try to attach devices during backup verification
The "restored" VM object will be discarded anyway, and it doesn't have real 'attach' method. Fixes QubesOS/qubes-issues#4830
This commit is contained in:
parent
2ad9b57961
commit
5e4831ede4
@ -1968,7 +1968,8 @@ class BackupRestore(object):
|
|||||||
options=options,
|
options=options,
|
||||||
persistent=True)
|
persistent=True)
|
||||||
try:
|
try:
|
||||||
new_vm.devices[bus].attach(assignment)
|
if not self.options.verify_only:
|
||||||
|
new_vm.devices[bus].attach(assignment)
|
||||||
except Exception as err: # pylint: disable=broad-except
|
except Exception as err: # pylint: disable=broad-except
|
||||||
self.log.error('Error attaching device %s:%s to %s: %s',
|
self.log.error('Error attaching device %s:%s to %s: %s',
|
||||||
bus, ident, vm.name, err)
|
bus, ident, vm.name, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user