From c75aeb400a765970e91cf5bfa5567842e3f44214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 7 Aug 2020 02:12:39 +0200 Subject: [PATCH] backup/restore: make error reporting work also for StandaloneVM based DispVM If management dispvm is based on a StandaloneVM not a AppVM, then there is just one level of templates, not two. QubesOS/qubes-issues#4670 --- qubesadmin/backup/dispvm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qubesadmin/backup/dispvm.py b/qubesadmin/backup/dispvm.py index f4c4acc..47307dc 100644 --- a/qubesadmin/backup/dispvm.py +++ b/qubesadmin/backup/dispvm.py @@ -305,7 +305,10 @@ class RestoreInDisposableVM: raise qubesadmin.exc.QubesException( 'qvm-backup-restore tool ' 'missing in {} template, install qubes-core-admin-client ' - 'package there'.format(self.dispvm.template.template.name) + 'package there'.format( + getattr(self.dispvm.template, + 'template', + self.dispvm.template).name) ) if exit_code != 0: raise qubesadmin.exc.BackupRestoreError(