Commit 510d28e3 refactored the seclabel code and one check was lost. Add the check back into the code. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1298031 Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- virtinst/seclabel.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/virtinst/seclabel.py b/virtinst/seclabel.py index 10bf4e8..02221f0 100644 --- a/virtinst/seclabel.py +++ b/virtinst/seclabel.py @@ -87,6 +87,11 @@ class Seclabel(XMLBuilder): default_cb=_get_default_type, default_name=TYPE_DEFAULT) + def validate(self): + if self.type == self.TYPE_STATIC and not self.label: + raise RuntimeError(_("A label must be specified for 'static' " + "security type.")) + label = XMLProperty("./label") imagelabel = XMLProperty("./imagelabel") baselabel = XMLProperty("./baselabel") -- 2.8.2 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list