diff options
| author | 2016-03-30 19:32:47 +0100 | |
|---|---|---|
| committer | 2016-03-30 19:32:47 +0100 | |
| commit | 810ba3f0bbbcdfe45dc48e67a2bcb3e277122e2f (patch) | |
| tree | e15badf613164e88729c619e32a12437a74b9b81 | |
| parent | added untested reconnection code. (diff) | |
added a little piece of code to stop Utils.get_url trying to json decode an empty string.
| -rw-r--r-- | Utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |
