Skip to content

Commit

Permalink
Fix bug in SubjectContains test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomi Richards committed Jun 15, 2015
1 parent c7d33b1 commit 3be0f0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gmailfilter/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def __init__(self, search_string, case_sensitive=False):
def match(self, message):
subject = message.get_headers()['Subject']
if self._case_sensitive:
return subject.contains(self._search_string)
return self._search_string in subject
else:
return sobject.casefold().contains(self._search_string.casefold())
return self._search_string.casefold() in subject.casefold()


class ListId(Test):
Expand Down

0 comments on commit 3be0f0d

Please sign in to comment.