aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-01-10 11:26:16 +0200
committerFilipp Lepalaan <f@0x00.co>2013-01-10 11:26:16 +0200
commit74eb6d7b25fab193a1645fb1645a08c9aded62dd (patch)
treeed7e6415a7d9038cb45262926de113b1365ce890
parentb2f78ab6053b51fa8ecf1e94e5eff58da7a7d1dd (diff)
downloadpy-gsxws-74eb6d7b25fab193a1645fb1645a08c9aded62dd.tar.gz
py-gsxws-74eb6d7b25fab193a1645fb1645a08c9aded62dd.tar.bz2
py-gsxws-74eb6d7b25fab193a1645fb1645a08c9aded62dd.zip
Added GsxError
-rwxr-xr-xgsx.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/gsx.py b/gsx.py
index 36b3185..fc14513 100755
--- a/gsx.py
+++ b/gsx.py
@@ -4,6 +4,7 @@ import re
import os
import json
import base64
+import suds
from suds.client import Client
from datetime import date, time
@@ -131,6 +132,15 @@ class CompTia:
def modifiers(self):
return self.data['modifiers']
+class GsxError(suds.WebFault):
+ def __init__(self, message, code=None):
+ super(GsxError, self).__init__()
+ self.code = code
+ sys.stderr.write("%s\n" % message)
+
+ def __unicode__(self):
+ return self.message
+
class Lookup(GsxObject):
def parts(self):
"""