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

Appearance settings

Commit 763921f

Browse filesBrowse files
committed
Revert "handle when the HTTP response body is empty"
This reverts commit 54c2070.
1 parent 54c2070 commit 763921f
Copy full SHA for 763921f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-39
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-39
lines changed

‎zencoder/zencoder.py

Copy file name to clipboardExpand all lines: zencoder/zencoder.py
+1-39Lines 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
if not self.as_xml:
55-
if not raw_body or raw_body == ' ':
56-
return None
57-
else:
58-
return json.loads(raw_body)
55+
return json.loads(raw_body)
5956

6057
def post(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-
def create(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-
if options:
205-
data.update(options)
206-
207-
return self.post(self.base_url, body=self.encode(data))
208-
209-
def details(self):
210-
"""
211-
Gets your account details
212-
"""
213-
data = {'api_key': self.api_key}
214-
return self.get(self.base_url, params=urlencode(data))
215-
216-
def integration(self):
217-
"""
218-
Puts your account into integration mode
219-
"""
220-
data = {'api_key': self.api_key}
221-
return self.get(self.base_url + '/integration',
222-
params=urlencode(data))
223-
224-
def live(self):
225-
"""
226-
Puts your account into live mode
227-
"""
228-
data = {'api_key': self.api_key}
229-
return self.get(self.base_url + '/live',
230-
params=urlencode(data))
231-

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.