From 1bb52b1417a79758e27ba4a3c71ba0f1d4cbbf8b Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 14 Oct 2015 22:05:33 +0300 Subject: Raise GsxError on empty Symptom/Issue search result --- gsxws/repairs.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gsxws') 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,)) -- cgit v1.2.3