summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-11-23 15:30:23 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:47 +0000
commit431160caf1fffaf223d50ef6239d666f69b0e4a4 (patch)
tree97a0cee070da6ee543a8c6c1762896710c844728 /bitbake/lib
parent246bd1861367066db325bb12a90551319675ad7b (diff)
downloadopenembedded-core-431160caf1fffaf223d50ef6239d666f69b0e4a4.tar.gz
openembedded-core-431160caf1fffaf223d50ef6239d666f69b0e4a4.tar.bz2
openembedded-core-431160caf1fffaf223d50ef6239d666f69b0e4a4.tar.xz
openembedded-core-431160caf1fffaf223d50ef6239d666f69b0e4a4.zip
taskdata: use 'any' in re_match_strings
(Bitbake rev: e48e9a2150ee76aaf151f6d5bc9e86e6ae4de514) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/taskdata.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index fdd55ee83..d2a350578 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -24,6 +24,7 @@ Task data collection and handling
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import logging
+import re
import bb
logger = logging.getLogger("BitBake.TaskData")
@@ -33,13 +34,8 @@ def re_match_strings(target, strings):
Whether or not the string 'target' matches
any one string of the strings which can be regular expression string
"""
- import re
-
- for name in strings:
- if (name==target or
- re.search(name, target)!=None):
- return True
- return False
+ return any(name == target or re.search(name, target) != None
+ for name in strings)
class TaskData:
"""