diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-02-20 03:20:35 +0100 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-02-20 03:43:16 +0100 |
commit | 8511f9d5dfd8db9071235470145f6698bd1d69d9 (patch) | |
tree | 8ff3514612f303ddc20395b9ca81dc80cd0a1afc /bvggrabber | |
parent | 0cfb6206440b0c30af6386032724a768d708f787 (diff) | |
download | bvg-grabber-8511f9d5dfd8db9071235470145f6698bd1d69d9.tar.gz bvg-grabber-8511f9d5dfd8db9071235470145f6698bd1d69d9.tar.bz2 bvg-grabber-8511f9d5dfd8db9071235470145f6698bd1d69d9.zip |
Watch your imports and take care of kwargs
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")) |