diff options
Diffstat (limited to 'bvggrabber')
-rw-r--r-- | bvggrabber/api/actualdeparture.py | 5 | ||||
-rw-r--r-- | bvggrabber/api/scheduleddeparture.py | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/bvggrabber/api/actualdeparture.py b/bvggrabber/api/actualdeparture.py index dd129b0..63cb97a 100644 --- a/bvggrabber/api/actualdeparture.py +++ b/bvggrabber/api/actualdeparture.py @@ -57,7 +57,8 @@ class ActualDepartureQueryApi(QueryApi): else: try: response.raise_for_status() - except RequestException as e: + except requests.RequestException as e: return Response(False, error=e) else: - return Response(False, error=Exception("An unknown error occured")) + return Response(False, + error=Exception("An unknown error occured")) diff --git a/bvggrabber/api/scheduleddeparture.py b/bvggrabber/api/scheduleddeparture.py index c001f55..f8ed037 100644 --- a/bvggrabber/api/scheduleddeparture.py +++ b/bvggrabber/api/scheduleddeparture.py @@ -79,7 +79,8 @@ class ScheduledDepartureQueryApi(QueryApi): else: try: response.raise_for_status() - except RequestException as e: - return Response(False, [], e) + except requests.RequestException as e: + return Response(False, error=e) else: - return Response(False, [], Exception("An unknown error occured")) + return Response(False, + error=Exception("An unknown error occured")) |