From 09f3da6b6428b48c85cf0f852e606ecc75b8aac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 4 Mar 2015 10:26:21 +0100 Subject: [PATCH] Do not cache the VT response if the URL is being procesed. --- url_abuse_async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/url_abuse_async.py b/url_abuse_async.py index a1649a1..af86e13 100644 --- a/url_abuse_async.py +++ b/url_abuse_async.py @@ -264,7 +264,8 @@ def vt_query_url(url, url_up, key, query, upload=True): link = res.get("permalink") positives = res.get("positives") total = res.get("total") - _cache_set(query, (msg, link, positives, total), 'vt') + if positives is not None: + _cache_set(query, (msg, link, positives, total), 'vt') return msg, link, positives, total