From 0168406f2c3a024007693346385fa7960e8e55ea Mon Sep 17 00:00:00 2001 From: Elad Alfassa Date: Sun, 7 Sep 2014 19:52:39 +0300 Subject: [PATCH] [safety] Move service URL to the top for easier maintainence --- safety.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/safety.py b/safety.py index d7b006535c..535b5184c1 100644 --- a/safety.py +++ b/safety.py @@ -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): """ @@ -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)