Fix logging error when getting events for a tracking number
Previously, an error message was printed using print() function. This is now changed to use logging.error() to properly log the error.
This commit is contained in:
parent
edb021536e
commit
07619ff4a8
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,8 @@ class KeyDelivery(BaseTracker):
|
|||
f"Got events for {tracking_number}: {len(all_events['data']['items'])}"
|
||||
)
|
||||
except KeyError:
|
||||
print(f"Error getting events for {tracking_number}: {all_events}")
|
||||
logging.error(
|
||||
f"Error getting events for {tracking_number}: {all_events}")
|
||||
return
|
||||
|
||||
events = sorted(
|
||||
|
|
Loading…
Reference in a new issue