Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Allow error strings from spam checker #2531

Merged
merged 2 commits into from
Oct 12, 2017
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Oct 11, 2017

This is a fairly crude way of getting this information to the user, but I'm not sure what would work better

if self.spam_checker.check_event_for_spam(event):
spam_error = self.spam_checker.check_event_for_spam(event)
if spam_error:
if not isinstance(spam_error, (str, basestring)):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think isinstance(spam_error, basestring) works fine?

@dbkr dbkr merged commit b8d8ed1 into develop Oct 12, 2017
@dbkr dbkr deleted the dbkr/spamcheck_error_messages branch October 17, 2017 12:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants