diff options
author | Scott Moser <smoser@ubuntu.com> | 2010-03-29 10:36:30 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2010-03-29 10:36:30 -0400 |
commit | bc0a5f24f95a47a7f846233e1fdda65bdb3d607e (patch) | |
tree | ff1ca192637a72b957f0d1e38f8e857430b7f770 /cloudinit/util.py | |
parent | 94ab32fa1b4216caf124a8954145086e9e048de5 (diff) | |
download | vyos-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/util.py')
-rw-r--r-- | cloudinit/util.py | 3 |
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 |