diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-03-23 15:23:22 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-03-23 15:23:22 +0200 |
commit | d866fa5337e5ad39bd0e37d4ebe1fcd2d12b98fb (patch) | |
tree | 7877980065d6faff1be90dfd010b2647eaa70136 | |
parent | 8aa0dc8aceeb8520b52a8488021eee156b91f1f1 (diff) | |
download | effitool-d866fa5337e5ad39bd0e37d4ebe1fcd2d12b98fb.tar.gz |
Fix: all conds must match
-rwxr-xr-x | effitool | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -314,12 +314,6 @@ class ContainsCond(SearchCond): return pattern in value -class NotContainsCond(SearchCond): - - def op(self, value, pattern): - return pattern not in value - - class RegexCond(SearchCond): def op(self, value, pattern): @@ -473,10 +467,8 @@ class Tool: matches = {} for rid, m in members.items(): - for c in conds: - if c.matches(m): - matches[rid] = m - break + if all(c.matches(m) for c in conds): + matches[rid] = m self._format_json(matches, sys.stdout) def _format_json(self, obj, output): |