Explorar o código

Assert that a TemplateVM can't have a template

Bahtiar `kalkin-` Gadimov %!s(int64=8) %!d(string=hai) anos
pai
achega
f74646fb1b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      qubes/vm/templatevm.py

+ 1 - 0
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