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>
This commit is contained in:
Chris Larson 2010-11-23 15:30:23 -07:00 committed by Richard Purdie
parent 246bd18613
commit 431160caf1
1 changed files with 3 additions and 7 deletions

View File

@ -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:
"""