From 810ba3f0bbbcdfe45dc48e67a2bcb3e277122e2f Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 30 Mar 2016 19:32:47 +0100 Subject: [PATCH] added a little piece of code to stop Utils.get_url trying to json decode an empty string. --- Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils.py b/Utils.py index f3363c5a..092946df 100644 --- a/Utils.py +++ b/Utils.py @@ -86,7 +86,7 @@ def get_url(url, **kwargs): break response_content = response_content.decode(encoding or "utf8") data = response_content - if kwargs.get("json"): + if kwargs.get("json") and data: try: data = json.loads(response_content) except json.decoder.JSONDecodeError: