]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/utils: remove param_bool()
authorRoss Burton <ross.burton@intel.com>
Thu, 30 Nov 2017 10:58:13 +0000 (10:58 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Dec 2017 11:24:38 +0000 (11:24 +0000)
This function is not used by any classes or recipes that I can find, so lets
delete it.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/utils.py

index 643ab78df7a5c4280dfbda6312dae1b87ce7251a..1897c5faea04d05e15babd8b4f329da03aa9733f 100644 (file)
@@ -86,17 +86,6 @@ def str_filter_out(f, str, d):
     from re import match
     return " ".join([x for x in str.split() if not match(f, x, 0)])
 
-def param_bool(cfg, field, dflt = None):
-    """Lookup <field> in <cfg> map and convert it to a boolean; take
-    <dflt> when this <field> does not exist"""
-    value = cfg.get(field, dflt)
-    strvalue = str(value).lower()
-    if strvalue in ('yes', 'y', 'true', 't', '1'):
-        return True
-    elif strvalue in ('no', 'n', 'false', 'f', '0'):
-        return False
-    raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value))
-
 def build_depends_string(depends, task):
     """Append a taskname to a string of dependencies as used by the [depends] flag"""
     return " ".join(dep + ":" + task for dep in depends.split())