From: Keir Fraser Date: Thu, 1 Nov 2007 09:36:46 +0000 (+0000) Subject: xend: Fix missing boolean xend config options X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14824^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4ce3209eaeee42179fc44359ad46833169ed3339;p=xen.git xend: 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 --- diff --git a/tools/python/xen/xend/XendOptions.py b/tools/python/xen/xend/XendOptions.py index 8f2cca3b33..4542323cf4 100644 --- a/tools/python/xen/xend/XendOptions.py +++ b/tools/python/xen/xend/XendOptions.py @@ -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]))