From 56f0caf6aeefbee1003e4694984dc322e92157ee Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Mon, 18 Feb 2013 05:17:57 -0600 Subject: [PATCH] skip translator results if [] or not http 200 --- modules/papers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/papers.py b/modules/papers.py index e86e2c0..84b3193 100644 --- a/modules/papers.py +++ b/modules/papers.py @@ -64,7 +64,7 @@ def download(phenny, input, verbose=True): response = requests.post(translation_url, data=data, headers=headers) - if response.status_code == 200: + if response.status_code == 200 and response.content != "[]": # see if there are any attachments content = json.loads(response.content) item = content[0]