Skip to content

Commit 831a602

Browse files
authored
Merge pull request #331 from kevincai/master
turn json null to json empty object
2 parents eb23e47 + 462b189 commit 831a602

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

qiniu/http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def __return_wrapper(resp):
2424
return None, ResponseInfo(resp)
2525
resp.encoding = 'utf-8'
2626
ret = resp.json(encoding='utf-8') if resp.text != '' else {}
27+
if ret is None: # json null
28+
ret = {}
2729
return ret, ResponseInfo(resp)
2830

2931

0 commit comments

Comments
 (0)