Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
nospam
Commits
00686b09
Commit
00686b09
authored
Oct 03, 2011
by
ale
Browse files
disable plugin correctly when not configured
parent
b268ce28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
nospam/plugins/google_sb.py
nospam/plugins/google_sb.py
+1
-2
No files found.
nospam/plugins/google_sb.py
View file @
00686b09
...
...
@@ -12,8 +12,7 @@ class GoogleSafeBrowsingPlugin(BasePlugin):
def
__init__
(
self
,
config
):
api_key
=
config
.
get
(
'safebrowsing_api_key'
)
if
not
api_key
:
self
.
enabled
=
False
return
raise
Exception
(
'Google SafeBrowsing API key not configured'
)
data_dir
=
config
.
get
(
'data_dir'
,
'./data'
)
dspath
=
os
.
path
.
join
(
data_dir
,
'nospam_gsb_datastore'
)
ds
=
datastore
.
DataStore
(
dspath
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment