[weboob] [PATCH 1/1] [itella] handle missing arrival date

Matthieu Weber mweber+weboob at free.fr
Mon Mar 21 18:06:54 CET 2016


Signed-off-by: Matthieu Weber <mweber+weboob at free.fr>
---
 modules/itella/pages.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/itella/pages.py b/modules/itella/pages.py
index d71e2a7..d43db4e 100644
--- a/modules/itella/pages.py
+++ b/modules/itella/pages.py
@@ -34,7 +34,8 @@ class SearchPage(JsonPage):
             raise ParcelNotFound("ID mismatch: expecting %s, got %s" % (_id, result_id))
 
         p = Parcel(_id)
-        p.arrival = parse_date(shipment["estimatedDeliveryTime"], ignoretz=True)
+        if shipment["estimatedDeliveryTime"]:
+            p.arrival = parse_date(shipment["estimatedDeliveryTime"], ignoretz=True)
         events = shipment["events"]
         p.history = [self.build_event(i, data) for i, data in enumerate(events)]
         most_recent = p.history[0]
-- 
2.1.4




More information about the weboob mailing list