Skip to content

Commit b01701e

Browse files
committed
Proposal for update to tests failing in PR #344
1 parent 3245c60 commit b01701e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

segment/analytics/request.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,17 @@ def post(write_key, host=None, gzip=False, timeout=15, proxies=None, oauth_manag
4545
kwargs = {
4646
"data": data,
4747
"headers": headers,
48-
"timeout": 15,
48+
"timeout": timeout,
4949
}
5050

5151
if proxies:
52-
kwargs['proxies'] = proxies
53-
res = None
52+
kwargs['proxies'] = {
53+
'http': proxies,
54+
'https': proxies,
55+
}
56+
5457
try:
55-
res = _session.post(url, data=data, headers=headers, timeout=timeout)
58+
res = _session.post(url, **kwargs)
5659
except Exception as e:
5760
log.error(e)
5861
raise e

0 commit comments

Comments
 (0)