diff options
Diffstat (limited to 'gsxws/products.py')
-rw-r--r-- | gsxws/products.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gsxws/products.py b/gsxws/products.py index 10ecc80..dfc4194 100644 --- a/gsxws/products.py +++ b/gsxws/products.py @@ -4,6 +4,8 @@ https://gsxwsut.apple.com/apidocs/ut/html/WSAPIChangeLog.html?user=asp """ import re +import os +import json from .utils import fetch_url from .lookups import Lookup @@ -16,11 +18,9 @@ def models(): >>> models() # doctest: +ELLIPSIS {'IPODCLASSIC': {'models': ['iPod 5th Generation (Late 2006)', ... """ - import os - import yaml - filepath = os.path.join(os.path.dirname(__file__), "products.yaml") - with open(filepath, 'r') as f: - return yaml.load(f) + fp = os.path.join(os.path.dirname(__file__), "products.json") + with open(fp, 'r') as f: + return json.load(f) class Product(object): |