mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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 <john.levon@sun.com>
This commit is contained in:
1 parent
1f0123a08f
commit
4ce3209eae
1 file changed
+4
@@ -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]))
|
||||
|
||||