aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-03-22 11:14:40 +0200
committerFilipp Lepalaan <f@0x00.co>2013-03-22 11:14:40 +0200
commit90cb38e43979668112ed6c38da8a8734ea30eee1 (patch)
tree0b2d60dffd6baf4e12240f8ac839f6f4eeed8270
parent9b6935a7d5e92b0bf3463781b4d460d9d8445771 (diff)
downloadpy-gsxws-90cb38e43979668112ed6c38da8a8734ea30eee1.tar.gz
py-gsxws-90cb38e43979668112ed6c38da8a8734ea30eee1.tar.bz2
py-gsxws-90cb38e43979668112ed6c38da8a8734ea30eee1.zip
Throw GsxError in Returns.get_label
-rwxr-xr-xgsxws.py6
1 files changed, 5 insertions, 1 deletions
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():