From a7cd9d1183be603777fc9c8c448281fe01224f7b Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 30 Nov 2017 10:58:13 +0000 Subject: lib/oe/utils: remove param_bool() This function is not used by any classes or recipes that I can find, so lets delete it. Signed-off-by: Ross Burton --- meta/lib/oe/utils.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 643ab78df7..1897c5faea 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -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 in map and convert it to a boolean; take - when this 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()) -- cgit 1.2.3-korg