aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws.py
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws.py')
-rwxr-xr-xgsxws.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gsxws.py b/gsxws.py
index a7dad00..53c2813 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -717,10 +717,12 @@ def connect(
account.userTimeZone = timezone
account.serviceAccountNo = sold_to
- result = CLIENT.service.Authenticate(account)
- SESSION['userSessionId'] = result.userSessionId
-
- return SESSION
+ try:
+ result = CLIENT.service.Authenticate(account)
+ SESSION['userSessionId'] = result.userSessionId
+ return SESSION
+ except suds.WebFault, e:
+ raise GsxError(code=e.fault.faultcode, message=e.fault.faultstring)
def logout():
CLIENT.service.Logout()