aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):