diff options
author | Filipp Lepalaan <f@0x00.co> | 2013-03-20 10:06:42 +0200 |
---|---|---|
committer | Filipp Lepalaan <f@0x00.co> | 2013-03-20 10:06:42 +0200 |
commit | 0061765555f182dc16ff0ddd2499a47024ee6be0 (patch) | |
tree | ac65ec77426631e30e2d4f78229f5a1ca76b2ede | |
parent | 7aa6ddee0223f3ab828c14bb406efc24fc942295 (diff) | |
download | py-gsxws-0061765555f182dc16ff0ddd2499a47024ee6be0.tar.gz py-gsxws-0061765555f182dc16ff0ddd2499a47024ee6be0.tar.bz2 py-gsxws-0061765555f182dc16ff0ddd2499a47024ee6be0.zip |
Raise GsxError in Order.submit()
-rwxr-xr-x | gsxws.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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): |