aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/list.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-06-25 14:49:39 -0400
committerW. Trevor King <wking@drexel.edu>2010-06-25 14:49:39 -0400
commit1791da7a299980d45c5891eb3e21280b58e70c7b (patch)
tree1659ae69d6bbb0f0f906428426c1e5cbd2600385 /libbe/command/list.py
parent0650774664d927e6209dd9f422a22d44f0f888fd (diff)
downloadbugseverywhere-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/command/list.py')
-rw-r--r--libbe/command/list.py10
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):