aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/comptia.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-05-13 09:11:45 +0300
committerFilipp Lepalaan <f@230.to>2013-05-13 09:11:45 +0300
commit54331c8677c35449809524154fcde1fed7c84c42 (patch)
treee68f46b62ff17aae780f4dee6ad7c1038f975082 /gsxws/comptia.py
parentc0eb64d41e921cf4ee3498d89591f5464c76eee7 (diff)
downloadpy-gsxws-54331c8677c35449809524154fcde1fed7c84c42.tar.gz
py-gsxws-54331c8677c35449809524154fcde1fed7c84c42.tar.bz2
py-gsxws-54331c8677c35449809524154fcde1fed7c84c42.zip
Better imports
Diffstat (limited to 'gsxws/comptia.py')
-rw-r--r--gsxws/comptia.py38
1 files changed, 21 insertions, 17 deletions
diff --git a/gsxws/comptia.py b/gsxws/comptia.py
index f7e7ff7..8d56fc0 100644
--- a/gsxws/comptia.py
+++ b/gsxws/comptia.py
@@ -1,3 +1,8 @@
+import os
+import json
+
+from core import GsxObject, GsxError, GsxCache
+
MODIFIERS = (
("A", "Not Applicable"),
("B", "Continuous"),
@@ -9,32 +14,31 @@ MODIFIERS = (
)
GROUPS = (
- ('0', 'General'),
- ('1', 'Visual'),
- ('2', 'Displays'),
- ('3', 'Mass Storage'),
- ('4', 'Input Devices'),
- ('5', 'Boards'),
- ('6', 'Power'),
- ('7', 'Printer'),
- ('8', 'Multi-function Device'),
- ('9', 'Communication Devices'),
- ('A', 'Share'),
- ('B', 'iPhone'),
- ('E', 'iPod'),
- ('F', 'iPad'),
+ ('0', "General"),
+ ('1', "Visual"),
+ ('2', "Displays"),
+ ('3', "Mass Storage"),
+ ('4', "Input Devices"),
+ ('5', "Boards"),
+ ('6', "Power"),
+ ('7', "Printer"),
+ ('8', "Multi-function Device"),
+ ('9', "Communication Devices"),
+ ('A', "Share"),
+ ('B', "iPhone"),
+ ('E', "iPod"),
+ ('F', "iPad"),
)
-class CompTIA(object):
+class CompTIA(GsxObject):
"Stores and accesses CompTIA codes."
-
def __init__(self):
"""
Initialize CompTIA symptoms from JSON file
"""
df = open(os.path.join(os.path.dirname(__file__), 'comptia.json'))
- self.data = json.load(df)
+ self._data = json.load(df)
def fetch(self):
"""