Skip to content

Commit 6901ee9

Browse files
committed
fix Account.create terms of service acceptance
The Zencoder api requires that 'terms_of_service' be '1' as a string in order for it to be accepted.
1 parent 356f165 commit 6901ee9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

zencoder/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from core import Zencoder
22
from core import ZencoderResponseError
33

4+
from core import Account

zencoder/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ def __init__(self, base_url, api_key=None, as_xml=False, timeout=None):
185185
"""
186186
super(Account, self).__init__(base_url, api_key, as_xml, 'account', timeout=timeout)
187187

188-
def create(self, email, tos=True, options=None):
188+
def create(self, email, tos=1, options=None):
189189
"""
190190
Creates an account with Zencoder, no API Key necessary.
191191
"""
192192
data = {'email': email,
193-
'terms_of_service': int(tos)}
193+
'terms_of_service': str(tos)}
194194
if options:
195195
data.update(options)
196196

0 commit comments

Comments
 (0)