summaryrefslogtreecommitdiff
path: root/modules/tracking.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tracking.py')
-rw-r--r--modules/tracking.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/tracking.py b/modules/tracking.py
index 1d6a5f7..7cf601f 100644
--- a/modules/tracking.py
+++ b/modules/tracking.py
@@ -183,6 +183,9 @@ class FedexModule(TrackingModule):
results = []
for package in packages:
lastevent = package['scanEventList'][0]
+ # Ignore events with missing date or time, this seems to be a temporary thing.
+ if not lastevent['date'] or not lastevent['time']:
+ continue
date = datetime.datetime.strptime('%s %s' % (lastevent['date'], lastevent['time']), '%Y-%m-%d %H:%M:%S')
if lastevent['gmtOffset']:
tz = pytz.timezone('Etc/GMT' + ('+' if lastevent['gmtOffset'][0] == '-' else '-') + str(int(lastevent['gmtOffset'][1:3])))