summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/tracking.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/tracking.py b/modules/tracking.py
index 548faa2..64db2b6 100644
--- a/modules/tracking.py
+++ b/modules/tracking.py
@@ -113,10 +113,11 @@ class PostenModule(TrackingModule):
isodate = last.find('{%s}OccuredAtIsoDateTime' % ns).text[:-10]
isodate = datetime.datetime.strptime(isodate, '%Y-%m-%dT%H:%M:%S')
city = last.find('{%s}City' % ns).text
+ status = last.find('{%s}Status' % ns).text.encode('utf-8')
if city:
desc = '%s (%s)' % (desc, city.encode('utf8'))
date = last.find('{%s}OccuredAtDisplayDate' % ns).text + ' ' + last.find('{%s}OccuredAtDisplayTime' % ns).text
- results.append(TrackingResult(code, isodate, desc, 'Sendingen er utlevert' in desc))
+ results.append(TrackingResult(code, isodate, desc, status == 'DELIVERED'))
return results
def code_split(code):