From a80c0655389a0ae5bcc2d49da5eebd033a6abc58 Mon Sep 17 00:00:00 2001 From: Gabriel RF Date: Fri, 4 Oct 2019 21:40:51 +0000 Subject: [PATCH] Minor fixes --- apitrackingmore.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apitrackingmore.py b/apitrackingmore.py index ff070c1..316754b 100644 --- a/apitrackingmore.py +++ b/apitrackingmore.py @@ -49,8 +49,8 @@ def get_carriers(code): }) try: carriers.append(cursor['carrier']) - return(carriers) - except: + return carriers + except KeyError: carriers = trackingmore.detect_carrier_from_code(code) carriers.sort(key=lambda carrier: carrier['code']) return carriers