From 70fcbd4e3227a23c7525f02432aaaa05f445dbf5 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 5 Aug 2013 12:15:56 +0300 Subject: Raise GsxError on getresponse() error --- gsxws/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3