From 23190836311dd173709e2489e8366ae94170407a Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Fri, 9 Sep 2011 14:24:17 +0200 Subject: [PATCH] dom0: use default kernel opts when custom opts isn't set This can happen after rpm upgrade. --- dom0/qvm-core/qubes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index d7fe856c..17f25a3b 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -2149,7 +2149,11 @@ class QubesVmCollection(dict): # for other cases - generic assigment is ok if "uses_default_kernelopts" in kwargs: - kwargs["uses_default_kernelopts"] = True if kwargs["uses_default_kernelopts"] == "True" else False + kwargs["uses_default_kernelopts"] = False if kwargs["uses_default_kernelopts"] == "False" else True + + if "kernelopts" in kwargs and kwargs["kernelopts"] == "None" or kwargs["kernelopts"] is None: + kwargs.pop("kernelopts") + kwargs["uses_default_kernelopts"] = True return kwargs