diff options
author | Filipp Lepalaan <filipp@mac.com> | 2018-04-02 14:47:38 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2018-04-02 14:47:38 +0300 |
commit | fd0eba9bacbe586004aeb131427178bc550cca06 (patch) | |
tree | 92ee8aaf0cd2d0a23133b26f437d44dc4c380d1e /gsxws/comptia.py | |
parent | 741f3329ebf600dc2c0c65c4383b8436fe54bac7 (diff) | |
download | py-gsxws-fd0eba9bacbe586004aeb131427178bc550cca06.tar.gz py-gsxws-fd0eba9bacbe586004aeb131427178bc550cca06.tar.bz2 py-gsxws-fd0eba9bacbe586004aeb131427178bc550cca06.zip |
Better Python 3 support
Diffstat (limited to 'gsxws/comptia.py')
-rw-r--r-- | gsxws/comptia.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gsxws/comptia.py b/gsxws/comptia.py index 3cd47d7..dfcd00e 100644 --- a/gsxws/comptia.py +++ b/gsxws/comptia.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from core import GsxObject, GsxCache +from .core import GsxObject, GsxCache MODIFIERS = ( ("A", "Not Applicable"), @@ -69,9 +69,9 @@ class CompTIA(GsxObject): for el in root.findall(".//comptiaGroup"): group = [] - comp_id = unicode(el[0].text) + comp_id = str(el[0].text) for ci in el.findall("comptiaCodeInfo"): - group.append((ci[0].text, unicode(ci[1].text)),) + group.append((ci[0].text, str(ci[1].text)),) self._comptia[comp_id] = group @@ -88,9 +88,9 @@ class CompTIA(GsxObject): """ r = dict() - for g, codes in self._comptia.items(): + for g, codes in list(self._comptia.items()): r[g] = list() - for k, v in codes.items(): + for k, v in list(codes.items()): r[g].append((k, v,)) return r[component] if component else r @@ -104,7 +104,7 @@ def fetch(): if __name__ == '__main__': import sys import doctest - from core import connect + from .core import connect logging.basicConfig(level=logging.DEBUG) connect(*sys.argv[1:4]) doctest.testmod() |