dom0/qvm-core: fix kernelopts parsing in case of QubesHVM

This commit is contained in:
Marek Marczykowski 2012-02-27 03:30:35 +01:00
parent 80e2afa97b
commit 628458108d

View File

@ -2526,8 +2526,9 @@ class QubesVmCollection(dict):
if "uses_default_kernelopts" in kwargs:
kwargs["uses_default_kernelopts"] = False if kwargs["uses_default_kernelopts"] == "False" else True
if "kernelopts" not in kwargs or kwargs["kernelopts"] == "None":
if "kernelopts" in kwargs and kwargs["kernelopts"] == "None":
kwargs.pop("kernelopts")
if "kernelopts" not in kwargs:
kwargs["uses_default_kernelopts"] = True
return kwargs