From: W. Trevor King Date: Fri, 25 Jun 2010 18:49:39 +0000 (-0400) Subject: Reworked `be list --extra-strings REGEXP` logic. X-Git-Tag: 1.0.0~47^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1791da7a299980d45c5891eb3e21280b58e70c7b;p=be.git Reworked `be list --extra-strings REGEXP` logic. Previous implementation only matched if *every* regexp matched *every* string. Current implementation matches is *any* regexp matches *any* string. --- diff --git a/libbe/command/list.py b/libbe/command/list.py index 197604b..c62e5a4 100644 --- a/libbe/command/list.py +++ b/libbe/command/list.py @@ -63,10 +63,16 @@ class Filter (object): if len(self.extra_strings_regexps) > 0: return False else: + matched = False for string in bug.extra_strings: for regexp in self.extra_strings_regexps: - if not regexp.match(string): - return False + if regexp.match(string): + matched = True + break + if matched == True: + break + if matched == False: + return False return True class List (libbe.command.Command):