aboutsummaryrefslogtreecommitdiffstats
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
parentea3462fc685ecb7c93ae4d82dd25e1a7cda4f63a (diff)
downloadpy-gsxws-75f0087e4fae39f21d0e362ecc7f8756cc0a828e.tar.gz
py-gsxws-75f0087e4fae39f21d0e362ecc7f8756cc0a828e.tar.bz2
py-gsxws-75f0087e4fae39f21d0e362ecc7f8756cc0a828e.zip
Set timeout to 30 sec, version bump.
-rw-r--r--gsxws/core.py5
-rw-r--r--setup.py2
2 files changed, 4 insertions, 3 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"')
diff --git a/setup.py b/setup.py
index 83ed1d9..58b754b 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="gsxws",
- version="0.4",
+ version="0.5",
description="Library for communicating with GSX Web Services API.",
install_requires=['PyYAML', 'lxml'],
classifiers=[