aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws.py
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws.py')
-rwxr-xr-xgsxws.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/gsxws.py b/gsxws.py
index 41be0ce..813cdd3 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -164,7 +164,7 @@ class GsxObject(object):
return rd
-class CompTia:
+class CompTIA:
"""
Stores and accesses CompTIA codes.
"""
@@ -211,10 +211,22 @@ class CompTia:
def symptoms(self, component=None):
symptoms = self.data['symptoms']
- return symptoms[component] if component else symptoms
+
+ if component:
+ r = list()
+ for k, v in symptoms[component].items():
+ r.append((k, v))
+ return r
+
+ return symptoms
def modifiers(self):
- return self.data['modifiers']
+ modifiers = list()
+
+ for k, v in self.data['modifiers'].items():
+ modifiers.append((k, v))
+
+ return modifiers
class GsxResponse(dict):
"""