Catch errors
This commit is contained in:
parent
3510bdb215
commit
fffc489187
1 changed files with 3 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ class ColissimoBackend(BaseBackend, ICapParcel):
|
|||
data = self.browser.get_tracking_info(_id)
|
||||
p = Parcel(_id)
|
||||
label = data['message']
|
||||
if data['error']:
|
||||
p.info = label
|
||||
return p
|
||||
p.info = label
|
||||
# TODO, need to know the delivery message
|
||||
if u"remis au gardien ou" in label or u"Votre colis est livré" in label:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue