Skip to content

Commit

Permalink
[safety] Move service URL to the top for easier maintainence
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Alfassa committed Sep 7, 2014
1 parent 05b562b commit 0168406
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
if sys.version_info.major > 2:
unicode = str

vt_base_api_url = 'https://www.virustotal.com/vtapi/v2/url/'


def configure(config):
"""
Expand Down Expand Up @@ -73,7 +75,6 @@ def url_handler(bot, trigger):
apikey = bot.config.safety.vt_api_key
if apikey is not None:
payload = {'resource': unicode(trigger), 'apikey': apikey, 'scan': '1'}
vt_base_api_url = 'https://www.virustotal.com/vtapi/v2/url/'

if trigger not in bot.memory['safety_cache']:
result = web.post(vt_base_api_url+'report', payload)
Expand Down

0 comments on commit 0168406

Please sign in to comment.