From e9e198cc10c656dae17c5f983413bc2aa7660385 Mon Sep 17 00:00:00 2001 From: WillyPillow Date: Tue, 25 Aug 2020 01:43:11 +0800 Subject: [PATCH] qvm-template: Make sure that template-dummy is set and used properly. --- qubesadmin/tools/qvm_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubesadmin/tools/qvm_template.py b/qubesadmin/tools/qvm_template.py index 8e5cea8..3558a9d 100644 --- a/qubesadmin/tools/qvm_template.py +++ b/qubesadmin/tools/qvm_template.py @@ -1231,11 +1231,13 @@ def remove( orig_dummy = dummy cnt = 1 while dummy in app.domains \ - and not app.domains[dummy].features.get('template-dummy', 0): + and app.domains[dummy].features.get( + 'template-dummy', '0') == '0': dummy = '%s-%d' % (orig_dummy, cnt) cnt += 1 if dummy not in app.domains: dummy_vm = app.add_new_vm('TemplateVM', dummy, 'red') + dummy_vm.features['template-dummy'] = 1 else: dummy_vm = app.domains[dummy]