We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e83afa8 commit 0628922Copy full SHA for 0628922
Allura/allura/lib/spam/akismetfilter.py
@@ -35,11 +35,16 @@
35
36
37
if AKISMET_AVAILABLE:
38
- class AkismetWithoutStartupVerify(akismet.Akismet):
+ class AkismetWithoutStartupVerify(akismet.SyncClient):
39
def __init__(self, key=None, blog_url=None):
40
# avoid possible errors at instantiation time, will encounter them later
41
self.api_key = key
42
self.blog_url = blog_url
43
+ self._config = akismet.Config(key=key, url=blog_url)
44
+ akismet_client = akismet.SyncClient(config=self._config)
45
+ self._http_client = akismet_client._http_client
46
+ if not akismet_client.verify_key(self._config.key, self._config.url):
47
+ raise Exception('Akismet key verification failed')
48
49
50
class AkismetSpamFilter(SpamFilter):
0 commit comments