aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/products.py9
-rw-r--r--gsxws/products.yaml2
2 files changed, 6 insertions, 5 deletions
diff --git a/gsxws/products.py b/gsxws/products.py
index 3de7cfc..38f5b01 100644
--- a/gsxws/products.py
+++ b/gsxws/products.py
@@ -1,8 +1,6 @@
"""
https://gsxwsut.apple.com/apidocs/ut/html/WSAPIChangeLog.html?user=asp
"""
-
-import sys
import urllib
from lookups import Lookup
@@ -13,10 +11,12 @@ from core import GsxObject, GsxError
def models():
"""
>>> models() # doctest: +ELLIPSIS
- {'iPad': {'models': 'iPad iPad (3rd gen)...
+ {'iphone_acc': {'models': 'Bluetooth Headset',...
"""
+ import os
import yaml
- return yaml.load(open("products.yaml"))
+ filepath = os.path.join(os.path.dirname(__file__), "products.yaml")
+ return yaml.load(open(filepath, 'r'))
class Product(GsxObject):
@@ -112,6 +112,7 @@ class Product(GsxObject):
if __name__ == '__main__':
+ import sys
import doctest
import logging
from core import connect
diff --git a/gsxws/products.yaml b/gsxws/products.yaml
index 5451d36..c3f5ffe 100644
--- a/gsxws/products.yaml
+++ b/gsxws/products.yaml
@@ -67,7 +67,7 @@ ipad:
iPad mini Wi-Fi, Cellular
iPad mini Wi-Fi, Cellular (MM)
-phone:
+iphone:
name: iPhone
models:
iPhone