aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-08-25 11:39:37 +0300
committerFilipp Lepalaan <f@230.to>2013-08-25 11:39:37 +0300
commit75f0087e4fae39f21d0e362ecc7f8756cc0a828e (patch)
tree2cdc1e7dc250d06d68bcd66f03ddbaedd4805920 /gsxws
parentea3462fc685ecb7c93ae4d82dd25e1a7cda4f63a (diff)
downloadpy-gsxws-75f0087e4fae39f21d0e362ecc7f8756cc0a828e.tar.gz
py-gsxws-75f0087e4fae39f21d0e362ecc7f8756cc0a828e.tar.bz2
py-gsxws-75f0087e4fae39f21d0e362ecc7f8756cc0a828e.zip
Set timeout to 30 sec, version bump.
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/core.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gsxws/core.py b/gsxws/core.py
index 67cf181..9769da5 100644
--- a/gsxws/core.py
+++ b/gsxws/core.py
@@ -43,6 +43,7 @@ GSX_ENV = "it"
GSX_LANG = "en"
GSX_REGION = "emea"
GSX_LOCALE = "en_XXX"
+GSX_TIMEOUT = 30
GSX_SESSION = None
@@ -235,7 +236,7 @@ class GsxRequest(object):
def _send(self, method, xmldata):
"Send the final SOAP message"
- global GSX_ENV, GSX_REGION, GSX_HOSTS, GSX_URL
+ global GSX_ENV, GSX_REGION, GSX_HOSTS, GSX_URL, GSX_TIMEOUT
self._url = GSX_URL.format(env=GSX_HOSTS[GSX_ENV], region=GSX_REGION)
parsed = urlparse(self._url)
@@ -243,7 +244,7 @@ class GsxRequest(object):
logging.debug(self._url)
logging.debug(xmldata)
- ws = httplib.HTTPSConnection(parsed.netloc, timeout=20)
+ ws = httplib.HTTPSConnection(parsed.netloc, timeout=GSX_TIMEOUT)
ws.putrequest("POST", parsed.path)
ws.putheader("User-Agent", "py-gsxws 0.9")
ws.putheader("Content-type", 'text/xml; charset="UTF-8"')