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

Commit763921f

Browse files
committed
Revert "handle when the HTTP response body is empty"
This reverts commit54c2070.
1 parent54c2070 commit763921f

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

‎zencoder/zencoder.py

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ def decode(self, raw_body):
5252
Returns the raw_body as json (the default) or XML
5353
"""
5454
ifnotself.as_xml:
55-
ifnotraw_bodyorraw_body==' ':
56-
returnNone
57-
else:
58-
returnjson.loads(raw_body)
55+
returnjson.loads(raw_body)
5956

6057
defpost(self,url,body=None):
6158
"""
@@ -194,38 +191,3 @@ def __init__(self, api_key, as_xml=False):
194191
"""
195192
super(Account,self).__init__(api_key,as_xml,'account')
196193

197-
defcreate(self,email,tos=True,options=None):
198-
"""
199-
Creates an account with Zencoder.
200-
"""
201-
data= {'email':email,
202-
'terms_of_service':int(tos)}
203-
204-
ifoptions:
205-
data.update(options)
206-
207-
returnself.post(self.base_url,body=self.encode(data))
208-
209-
defdetails(self):
210-
"""
211-
Gets your account details
212-
"""
213-
data= {'api_key':self.api_key}
214-
returnself.get(self.base_url,params=urlencode(data))
215-
216-
defintegration(self):
217-
"""
218-
Puts your account into integration mode
219-
"""
220-
data= {'api_key':self.api_key}
221-
returnself.get(self.base_url+'/integration',
222-
params=urlencode(data))
223-
224-
deflive(self):
225-
"""
226-
Puts your account into live mode
227-
"""
228-
data= {'api_key':self.api_key}
229-
returnself.get(self.base_url+'/live',
230-
params=urlencode(data))
231-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp