diff options
author | Chris Larson <clarson@kergoth.com> | 2004-09-16 02:22:08 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-09-16 02:22:08 +0000 |
commit | bc2f9d886c65ee97c499b8dd6822590e515801c5 (patch) | |
tree | bf8256e95fab869a1c0894e12e0733eb924480a8 /classes/base.oeclass | |
parent | 8d639192b6965d9a8867af6a5249e230b164816a (diff) |
Simplify oe_filter and oe_filter_out by using the filter() python function.
BKrev: 4148f8d01xum7PhEwpKyjez-QS0XSw
Diffstat (limited to 'classes/base.oeclass')
-rw-r--r-- | classes/base.oeclass | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/classes/base.oeclass b/classes/base.oeclass index 508dbd5509..cb8d59df12 100644 --- a/classes/base.oeclass +++ b/classes/base.oeclass @@ -41,19 +41,11 @@ FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/$ def oe_filter(f, str, d): from re import match - ret = [] - for w in str.split(): - if match(f, w, 0): - ret += [ w ] - return " ".join(ret) + return " ".join(filter(lambda x: match(f, x, 0), str.split())) def oe_filter_out(f, str, d): from re import match - ret = [] - for w in str.split(): - if not match(f, w, 0): - ret += [ w ] - return " ".join(ret) + return " ".join(filter(lambda x: not match(f, x, 0), str.split())) die() { oefatal "$*" |