aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-08-05 12:15:56 +0300
committerFilipp Lepalaan <f@230.to>2013-08-05 12:15:56 +0300
commit70fcbd4e3227a23c7525f02432aaaa05f445dbf5 (patch)
tree6e2125b9ce596831c39c9f81863f859546fa8da1
parent05551fbdd641d25cc20648afade7e8c78545a341 (diff)
downloadpy-gsxws-70fcbd4e3227a23c7525f02432aaaa05f445dbf5.tar.gz
py-gsxws-70fcbd4e3227a23c7525f02432aaaa05f445dbf5.tar.bz2
py-gsxws-70fcbd4e3227a23c7525f02432aaaa05f445dbf5.zip
Raise GsxError on getresponse() error
-rw-r--r--gsxws/core.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gsxws/core.py b/gsxws/core.py
index b56fa7b..93dddb7 100644
--- a/gsxws/core.py
+++ b/gsxws/core.py
@@ -235,7 +235,10 @@ class GsxRequest(object):
ws.endheaders()
ws.send(xmldata)
- return ws.getresponse()
+ try:
+ return ws.getresponse()
+ except Exception, e:
+ raise GsxError('GSX connection failed: %s' % e)
def _submit(self, method, response=None, raw=False):
"Constructs and submits the final SOAP message"