From 391949c68afedfe5a51675d614d7cde39c7313e1 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 2 Jul 2013 01:18:34 +0300 Subject: Initialize parts list in Product.warranty() --- gsxws/products.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gsxws/products.py b/gsxws/products.py index dc77dc2..0de6601 100644 --- a/gsxws/products.py +++ b/gsxws/products.py @@ -13,7 +13,7 @@ from core import GsxObject, GsxError def models(): """ >>> models() # doctest: +ELLIPSIS - {'MAC_ACC': {'models': ['AirPort Card', ... + {'IPODCLASSIC': {'models': ['iPod 5th Generation (Late 2006)', ... """ import os import yaml @@ -58,6 +58,8 @@ class Product(GsxObject): if not hasattr(self, "serialNumber"): self.activation() + self.parts = [] + try: self.partNumbers = [] for k, v in parts: -- cgit v1.2.3