From 1791da7a299980d45c5891eb3e21280b58e70c7b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 25 Jun 2010 14:49:39 -0400 Subject: [PATCH] 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. --- libbe/command/list.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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): -- 2.26.2