diff options
author | Ross Burton <ross.burton@intel.com> | 2017-11-30 10:58:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-02 11:25:34 +0000 |
commit | 4469acdf1d0338220f3fe2ecb5e079eea6fda375 (patch) | |
tree | f6529ff46fcffe00161e493c50bd62175d117ea0 /meta/lib | |
parent | eeb79f4e18704c665c4339882efd0fde1e65d20a (diff) | |
download | poky-4469acdf1d0338220f3fe2ecb5e079eea6fda375.tar.gz |
lib/oe/utils: remove param_bool()
This function is not used by any classes or recipes that I can find, so lets
delete it.
(From OE-Core rev: a7cd9d1183be603777fc9c8c448281fe01224f7b)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/utils.py | 11 |
1 files changed, 0 insertions, 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): | |||
86 | from re import match | 86 | from re import match |
87 | return " ".join([x for x in str.split() if not match(f, x, 0)]) | 87 | return " ".join([x for x in str.split() if not match(f, x, 0)]) |
88 | 88 | ||
89 | def param_bool(cfg, field, dflt = None): | ||
90 | """Lookup <field> in <cfg> map and convert it to a boolean; take | ||
91 | <dflt> when this <field> does not exist""" | ||
92 | value = cfg.get(field, dflt) | ||
93 | strvalue = str(value).lower() | ||
94 | if strvalue in ('yes', 'y', 'true', 't', '1'): | ||
95 | return True | ||
96 | elif strvalue in ('no', 'n', 'false', 'f', '0'): | ||
97 | return False | ||
98 | raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value)) | ||
99 | |||
100 | def build_depends_string(depends, task): | 89 | def build_depends_string(depends, task): |
101 | """Append a taskname to a string of dependencies as used by the [depends] flag""" | 90 | """Append a taskname to a string of dependencies as used by the [depends] flag""" |
102 | return " ".join(dep + ":" + task for dep in depends.split()) | 91 | return " ".join(dep + ":" + task for dep in depends.split()) |