summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-03-29 10:36:30 -0400
committerScott Moser <smoser@ubuntu.com>2010-03-29 10:36:30 -0400
commitbc0a5f24f95a47a7f846233e1fdda65bdb3d607e (patch)
treeff1ca192637a72b957f0d1e38f8e857430b7f770 /cloudinit
parent94ab32fa1b4216caf124a8954145086e9e048de5 (diff)
downloadvyos-cloud-init-bc0a5f24f95a47a7f846233e1fdda65bdb3d607e.tar.gz
vyos-cloud-init-bc0a5f24f95a47a7f846233e1fdda65bdb3d607e.zip
util.py: allow for case-insensitive "true" values in get_cfg_option_bool.
LP: 507709 LP: #507709
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/util.py3
1 files changed, 2 insertions, 1 deletions
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