From f15ddf78018a3f3ccf949a4c8981ecee6f31260b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 14 Jul 2016 02:06:08 +0200 Subject: [PATCH] backup: fix restoring on system without default netvm Fixes QubesOS/qubes-issues#2168 --- core/backup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/backup.py b/core/backup.py index 1f774122..9c455e24 100644 --- a/core/backup.py +++ b/core/backup.py @@ -1718,8 +1718,9 @@ def restore_info_verify(restore_info, host_collection): if not (netvm_name in restore_info.keys() and restore_info[netvm_name]['vm'].is_netvm()): if options['use-default-netvm']: - vm_info['netvm'] = host_collection \ - .get_default_netvm().name + default_netvm = host_collection.get_default_netvm() + vm_info['netvm'] = default_netvm.name if \ + default_netvm else None vm_info['vm'].uses_default_netvm = True elif options['use-none-netvm']: vm_info['netvm'] = None