carrier: dhl: Make absolutely sure that an API key is in the extra
1 files changed, 3 insertions(+), 0 deletions(-) M shipments/carrier.py
M shipments/carrier.py => shipments/carrier.py +3 -0
@@ 394,6 394,9 @@ class DHL(Carrier): ] def get_info(self, code, extra): + if not 'apikey' in extra: + raise ValueError("Missing 'apikey' in extra data") + url = 'https://api-eu.dhl.com/track/shipments' headers = { 'Accept': 'application/json',