diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-03-07 09:47:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-23 15:43:55 +0000 |
commit | 354d85dd358c82b2bb0f97235d2027bd54fd7b18 (patch) | |
tree | ab1fa05b86c33d979633197cfcdf6fabc922611b /meta/lib/oe | |
parent | c9d1e20ab75fa21606c38f7f9d88d879117b3ce9 (diff) | |
download | poky-354d85dd358c82b2bb0f97235d2027bd54fd7b18.tar.gz |
oe.utils: add inherits (sync from OE)
(From OE-Core rev: 0bdb38820489a69448e36c75863e2e2d47cdb20f)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 69f9384dc7..f6d4142c12 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py | |||
@@ -80,3 +80,7 @@ def param_bool(cfg, field, dflt = None): | |||
80 | elif strvalue in ('no', 'n', 'false', 'f', '0'): | 80 | elif strvalue in ('no', 'n', 'false', 'f', '0'): |
81 | return False | 81 | return False |
82 | raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value)) | 82 | raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value)) |
83 | |||
84 | def inherits(d, *classes): | ||
85 | """Return True if the metadata inherits any of the specified classes""" | ||
86 | return any(bb.data.inherits_class(cls, d) for cls in classes) | ||