Skip to content

Commit 2d4108c

Browse files
committed
Explicit test a blank response instead of any non-json response
1 parent 9ae5d5a commit 2d4108c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

convertapi/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ def handle_response(self, r):
5151
except ValueError:
5252
raise e
5353

54-
try:
55-
return r.json()
56-
except simplejson.errors.JSONDecodeError as e:
54+
if r.content == b'':
5755
raise AsyncConversionInProgress
5856

57+
return r.json()
58+
5959
def url(self, path):
6060
return "%s%s?Secret=%s" % (convertapi.base_uri, path, convertapi.api_secret)
6161

0 commit comments

Comments
 (0)