diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2015-02-25 12:45:34 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2015-02-25 12:45:34 +0100 |
commit | 940a30c6c5a1e86d2705f8d1cd858fb93e2a9fc6 (patch) | |
tree | 9ca3f92a5cd395658cf28bef2d602c285cc8c0db /modules | |
parent | edd6d64b9b7acb52285bbf56417139600509a018 (diff) |
tracking: tollpost/postnord: Make sure status is set if no location is given.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index c86ef46..c7d7d11 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -240,6 +240,8 @@ class TollpostModule(TrackingModule): location = lastevent['location'].get('name') or lastevent['location'].get('city') if location: status = '%s (%s)' % (event, location) + else: + status = event results.append(TrackingResult(code, date, status.encode('utf-8'), delivered)) return results @@ -274,6 +276,8 @@ class PostNordModule(TrackingModule): location = lastevent['location'].get('name') or lastevent['location'].get('city') if location: status = '%s (%s)' % (event, location) + else: + status = event results.append(TrackingResult(code, date, status.encode('utf-8'), delivered)) return results |