Skip to content

Commit 37a4f48

Browse files
author
LiamNorman
committed
Added default of 10
1 parent f2c645b commit 37a4f48

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

sailthru/sailthru_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class SailthruClient(object):
5555
client = SailthruClient(api_key, api_secret)
5656
"""
5757

58-
def __init__(self, api_key, secret, api_url=None, request_timeout=None):
58+
def __init__(self, api_key, secret, api_url=None, request_timeout=10):
5959
self.api_key = api_key
6060
self.secret = secret
6161
self.api_url = api_url if api_url else 'https://api.sailthru.com'

sailthru/sailthru_http.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ def flatten(hash_table, brackets=True):
2727
return f
2828
return flatten(hash_table, False)
2929

30-
def sailthru_http_request(url, data, method, file_data=None, headers=None, request_timeout=None):
30+
def sailthru_http_request(url, data, method, file_data=None, headers=None, request_timeout=10):
3131
"""
3232
Perform an HTTP GET / POST / DELETE request
3333
"""
3434
data = flatten_nested_hash(data)
3535
method = method.upper()
3636
params, data = (None, data) if method == 'POST' else (data, None)
3737
sailthru_headers = {'User-Agent': 'Sailthru API Python Client %s; Python Version: %s' % ('2.3.4', platform.python_version())}
38-
request_timeout = request_timeout if request_timeout is not None else 10
3938
if headers and isinstance(headers, dict):
4039
for key, value in sailthru_headers.items():
4140
headers[key] = value

0 commit comments

Comments
 (0)