Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09bfe4a

Browse files
committed
when empty json is returned from zencoder, don't attempt to parse it
1 parent763921f commit09bfe4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎zencoder/zencoder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ def decode(self, raw_body):
5252
Returns the raw_body as json (the default) or XML
5353
"""
5454
ifnotself.as_xml:
55-
returnjson.loads(raw_body)
55+
# only parse json when it exists, else just return None
56+
ifnotraw_bodyorraw_body==' ':
57+
returnNone
58+
else:
59+
returnjson.loads(raw_body)
5660

5761
defpost(self,url,body=None):
5862
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp