Commit 00686b09 authored by ale's avatar ale
Browse files

disable plugin correctly when not configured

parent b268ce28
......@@ -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
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment