From f74646fb1b41b80d2efd433b8f47c35b4abb3aed Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 23 Mar 2016 18:23:12 +0100 Subject: [PATCH] Assert that a TemplateVM can't have a template --- qubes/vm/templatevm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qubes/vm/templatevm.py b/qubes/vm/templatevm.py index 52ee5dea..f0c7fe2f 100644 --- a/qubes/vm/templatevm.py +++ b/qubes/vm/templatevm.py @@ -22,6 +22,7 @@ class TemplateVM(qubes.vm.qubesvm.QubesVM): yield vm def __init__(self, *args, **kwargs): + assert 'template' not in kwargs, "A TemplateVM can not have a template" super(TemplateVM, self).__init__(*args, **kwargs) # Some additional checks for template based VM