Fix missing boolean xend config options
PATCH 1/1 Fix missing boolean xend config options
# HG changeset patch
# User [email protected]
# Date 1193871970 25200
# Node ID adbe1cac902262376f8af907e36d35cbf0292f89 # Parent d6a5c302e13680fceb473a25dce818ecee9e930e Fix missing boolean xend config options
If a boolean option was missing in the SCF database, we weren't processing the default value correctly.
Signed-off-by John Levon <[email protected]>
tools/python/xen/xend/XendOptions.py +4 -0
@@ -386,6 +386,10 @@ if os.uname()[0] == 'SunOS': return scf.get_bool(name) except scf.error, e: if e[0] == scf.SCF_ERROR_NOT_FOUND: + if val in ['yes', 'y', '1', 'on', 'true', 't']: + return True + if val in ['no', 'n', '0', 'off', 'false', 'f']: + return False return val else: raise XendError("option %s: %s:%s" % (name, e[1], e[2]))