From 51ff020d1661fcecadffb0dc471e64927780bcd0 Mon Sep 17 00:00:00 2001 From: Rohit Agarwal Date: Wed, 22 Apr 2015 12:37:59 -0700 Subject: [PATCH] Use only a single value for both connect and read timeouts. Separate values for connect and read timeouts is not supported in python-requests < 2.4.0. --- qds_sdk/connection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qds_sdk/connection.py b/qds_sdk/connection.py index dc4f00a4..d3c8b428 100644 --- a/qds_sdk/connection.py +++ b/qds_sdk/connection.py @@ -80,13 +80,13 @@ def _api_call_raw(self, req_type, path, data=None, params=None): log.info("Params: %s" % params) if req_type == 'GET': - r = x.get(url, timeout=(30, 300), **kwargs) + r = x.get(url, timeout=300, **kwargs) elif req_type == 'POST': - r = x.post(url, timeout=(30, 300), **kwargs) + r = x.post(url, timeout=300, **kwargs) elif req_type == 'PUT': - r = x.put(url, timeout=(30, 300), **kwargs) + r = x.put(url, timeout=300, **kwargs) elif req_type == 'DELETE': - r = x.delete(url, timeout=(30, 300), **kwargs) + r = x.delete(url, timeout=300, **kwargs) else: raise NotImplemented