Skip to content

Commit 3cb32c9

Browse files
authored
fix proxies (#488)
1 parent a2db8d8 commit 3cb32c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

segment/analytics/request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ 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:
5252
kwargs['proxies'] = proxies
53-
res = None
53+
5454
try:
55-
res = _session.post(url, data=data, headers=headers, timeout=timeout)
55+
res = _session.post(url, **kwargs)
5656
except Exception as e:
5757
log.error(e)
5858
raise e

0 commit comments

Comments
 (0)