From bcd1811204bfbb673ada35bd78d3bdb69c7557e6 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 14 Mar 2013 18:22:34 +0200 Subject: Throw GsxError on Repair.mark_complete() --- gsxws.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gsxws.py') diff --git a/gsxws.py b/gsxws.py index e399cfa..f46bcb6 100755 --- a/gsxws.py +++ b/gsxws.py @@ -138,7 +138,7 @@ class GsxObject(object): result = f(data) return getattr(result, attr) if attr else result except suds.WebFault, e: - raise GsxError(code=e.fault.faultcode, message=e.fault.faultstring) + raise GsxError(fault=e) def _make_type(self, new_dt): """ @@ -333,7 +333,8 @@ class GsxError(Exception): else: self.code = code self.message = message - self.data = (self.code, self.message) + + self.data = (self.code, self.message) def __getitem__(self, idx): return self.data[idx] @@ -768,7 +769,7 @@ def connect( SESSION['userSessionId'] = result.userSessionId return SESSION except suds.WebFault, e: - raise GsxError(code=e.fault.faultcode, message=e.fault.faultstring) + raise GsxError(fault=e) def logout(): CLIENT.service.Logout() -- cgit v1.2.3