Skip to content

Commit

Permalink
Refs #70 Fix unittests for whitelist_subject and free_mail
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinaghiorghita committed Jan 26, 2017
1 parent 3194f8f commit 7b6804a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pad/plugins/free_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def check_freemail_header(self, msg, header, regex=None, target=None):
return False
if regex:
try:
check_re = Regex(regex)
check_re = Regex(regex).compile()
except re.error:
self.ctxt.log.warn("FreeMail::Plugin check_freemail_header"
" regex error")
Expand Down Expand Up @@ -300,7 +300,7 @@ def check_freemail_body(self, msg, regex=None, target=None):
return False
if regex:
try:
check_re = Regex(regex)
check_re = Regex(regex).compile()
except re.error:
self.ctxt.log.warn("FreeMail::Plugin check_freemail_from"
" regex error")
Expand Down
2 changes: 1 addition & 1 deletion pad/plugins/whitelist_subject.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def parse_config(self, key, value):
# Need to check if the option is a valid regular expression.
if key in self.options:
try:
Regex(value.strip())
Regex(value.strip()).compile()
except re.error:
return
self.set_append_option(key, value)
Expand Down

0 comments on commit 7b6804a

Please sign in to comment.