diff options
author | Filipp Lepalaan <f@230.to> | 2013-08-05 12:15:56 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-08-05 12:15:56 +0300 |
commit | 70fcbd4e3227a23c7525f02432aaaa05f445dbf5 (patch) | |
tree | 6e2125b9ce596831c39c9f81863f859546fa8da1 | |
parent | 05551fbdd641d25cc20648afade7e8c78545a341 (diff) | |
download | py-gsxws-70fcbd4e3227a23c7525f02432aaaa05f445dbf5.tar.gz py-gsxws-70fcbd4e3227a23c7525f02432aaaa05f445dbf5.tar.bz2 py-gsxws-70fcbd4e3227a23c7525f02432aaaa05f445dbf5.zip |
Raise GsxError on getresponse() error
-rw-r--r-- | gsxws/core.py | 5 |
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" |