don't crash if a message content is None

This commit is contained in:
Romain Bignon 2012-03-22 21:55:34 +01:00
commit 9bf7d618d8
2 changed files with 4 additions and 1 deletions

View file

@ -128,6 +128,9 @@ class AntiSpam(object):
def check_mail(self, mail):
# Spambot with a long first-message.
if mail['message'] is None:
return True
if mail['message'].find('Je veux que vous m\'ayez ecrit directement sur le mon e-mail') >= 0:
return False
if mail['message'].find('ilusa12010@live.fr') >= 0: