aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-03-20 10:06:42 +0200
committerFilipp Lepalaan <f@0x00.co>2013-03-20 10:06:42 +0200
commit0061765555f182dc16ff0ddd2499a47024ee6be0 (patch)
treeac65ec77426631e30e2d4f78229f5a1ca76b2ede
parent7aa6ddee0223f3ab828c14bb406efc24fc942295 (diff)
downloadpy-gsxws-0061765555f182dc16ff0ddd2499a47024ee6be0.tar.gz
py-gsxws-0061765555f182dc16ff0ddd2499a47024ee6be0.tar.bz2
py-gsxws-0061765555f182dc16ff0ddd2499a47024ee6be0.zip
Raise GsxError in Order.submit()
-rwxr-xr-xgsxws.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gsxws.py b/gsxws.py
index 2e7aac6..772452c 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -416,8 +416,12 @@ class Order(GsxObject):
dt = CLIENT.factory.create('ns1:createStockingOrderRequestType')
dt.userSession = SESSION
dt.orderData = self.data
- result = CLIENT.service.CreateStockingOrder(dt)
- return result.orderConfirmation
+
+ try:
+ result = CLIENT.service.CreateStockingOrder(dt)
+ return result.orderConfirmation
+ except suds.WebFault, e:
+ raise GsxError(fault=e)
class Returns(GsxObject):
def __init__(self, order_number=None, *args, **kwargs):