aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-03-29 12:46:31 +0200
committerFilipp Lepalaan <f@230.to>2013-03-29 12:46:31 +0200
commit2a1a80dbb6e730f43a0fac2cac5208ce74ecb5a1 (patch)
tree7acf53a0c98cb36df1cafe38dabedccb6f8381e0 /gsxws.py
parent4621f14bae1487c0eb1bfd57d64b3c16a08072a7 (diff)
downloadpy-gsxws-2a1a80dbb6e730f43a0fac2cac5208ce74ecb5a1.tar.gz
py-gsxws-2a1a80dbb6e730f43a0fac2cac5208ce74ecb5a1.tar.bz2
py-gsxws-2a1a80dbb6e730f43a0fac2cac5208ce74ecb5a1.zip
Return groups after comptia.fetch()
Diffstat (limited to 'gsxws.py')
-rwxr-xr-xgsxws.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gsxws.py b/gsxws.py
index 111af5b..888838d 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -223,6 +223,8 @@ class CompTIA:
def fetch(self):
'''
+ The CompTIA Codes Lookup API retrieves a list of CompTIA groups and modifiers.
+
Here we must resort to raw XML parsing since SUDS throws this:
suds.TypeNotFound: Type not found: 'comptiaDescription'
when calling CompTIACodes()...
@@ -245,13 +247,15 @@ class CompTIA:
for ci in el.findall('comptiaCodeInfo'):
group['codes'][ci[0].text] = ci[1].text
-
+
self.groups[comp_id] = group
for el in root.findall('.//comptiaModifier'):
descr, code = list(el)
self.modifiers[code.text] = descr.text
+ return self.groups
+
def symptoms(self, component=None):
symptoms = self.data['symptoms']