From bc0a5f24f95a47a7f846233e1fdda65bdb3d607e Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 29 Mar 2010 10:36:30 -0400 Subject: util.py: allow for case-insensitive "true" values in get_cfg_option_bool. LP: 507709 LP: #507709 --- cloudinit/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cloudinit/util.py') diff --git a/cloudinit/util.py b/cloudinit/util.py index 596054f2..f1a0d50d 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -28,7 +28,8 @@ def read_conf(fname): def get_cfg_option_bool(yobj, key, default=False): if not yobj.has_key(key): return default val = yobj[key] - if yobj[key] in [ True, '1', 'on', 'yes', 'true']: + if val is True: return True + if str(val).lower() in [ 'true', '1', 'on', 'yes']: return True return False -- cgit v1.2.3