diff options
author | Filipp Lepalaan <f@0x00.co> | 2013-01-10 11:26:16 +0200 |
---|---|---|
committer | Filipp Lepalaan <f@0x00.co> | 2013-01-10 11:26:16 +0200 |
commit | 74eb6d7b25fab193a1645fb1645a08c9aded62dd (patch) | |
tree | ed7e6415a7d9038cb45262926de113b1365ce890 /gsx.py | |
parent | b2f78ab6053b51fa8ecf1e94e5eff58da7a7d1dd (diff) | |
download | py-gsxws-74eb6d7b25fab193a1645fb1645a08c9aded62dd.tar.gz py-gsxws-74eb6d7b25fab193a1645fb1645a08c9aded62dd.tar.bz2 py-gsxws-74eb6d7b25fab193a1645fb1645a08c9aded62dd.zip |
Added GsxError
Diffstat (limited to 'gsx.py')
-rwxr-xr-x | gsx.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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): """ |