瀏覽代碼

Assert that a TemplateVM can't have a template

Bahtiar `kalkin-` Gadimov 8 年之前
父節點
當前提交
f74646fb1b
共有 1 個文件被更改,包括 1 次插入0 次删除
  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