From 90cb38e43979668112ed6c38da8a8734ea30eee1 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 22 Mar 2013 11:14:40 +0200 Subject: Throw GsxError in Returns.get_label --- gsxws.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gsxws.py b/gsxws.py index a2b85d5..2ede93b 100755 --- a/gsxws.py +++ b/gsxws.py @@ -456,7 +456,11 @@ class Returns(GsxObject): dt.partNumber = part_number dt.userSession = SESSION - result = CLIENT.service.ReturnLabel(dt) + try: + result = CLIENT.service.ReturnLabel(dt) + except suds.WebFault, e: + raise GsxError(fault=e) + el = ET.fromstring(result).findall('*//%s' % 'returnLabelData')[0] for r in el.iter(): -- cgit v1.2.3