diff options
author | W. Trevor King <wking@drexel.edu> | 2010-06-25 14:49:39 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-06-25 14:49:39 -0400 |
commit | 1791da7a299980d45c5891eb3e21280b58e70c7b (patch) | |
tree | 1659ae69d6bbb0f0f906428426c1e5cbd2600385 /libbe | |
parent | 0650774664d927e6209dd9f422a22d44f0f888fd (diff) | |
download | bugseverywhere-1791da7a299980d45c5891eb3e21280b58e70c7b.tar.gz |
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.
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/command/list.py | 10 |
1 files 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): |