aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-10-14 22:05:33 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-10-14 22:05:33 +0300
commit1bb52b1417a79758e27ba4a3c71ba0f1d4cbbf8b (patch)
tree93d3d85b5937dfef8a40552b752688e11e0443f6
parent3420f74425c8e8247bef4a916bc053f1ed95df07 (diff)
downloadpy-gsxws-1bb52b1417a79758e27ba4a3c71ba0f1d4cbbf8b.tar.gz
py-gsxws-1bb52b1417a79758e27ba4a3c71ba0f1d4cbbf8b.tar.bz2
py-gsxws-1bb52b1417a79758e27ba4a3c71ba0f1d4cbbf8b.zip
Raise GsxError on empty Symptom/Issue search result
-rw-r--r--gsxws/repairs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gsxws/repairs.py b/gsxws/repairs.py
index 989c94d..e34219f 100644
--- a/gsxws/repairs.py
+++ b/gsxws/repairs.py
@@ -59,6 +59,10 @@ class SymptomIssue(GsxObject):
"ReportedSymptomIssueResponse")
r = self._req.objects.reportedSymptomIssueResponse
+ # This may sometimes come back empty...
+ if r is None:
+ raise GsxError('Symptom/Issue code search failed')
+
if r.symptoms is not None:
for s in r.symptoms:
result.append((s.reportedSymptomCode, s.reportedSymptomDesc,))