diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-07-27 16:30:27 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-07-27 16:30:27 +0200 |
commit | 48b4347ccad9b284967eee7017db4585c04e84cf (patch) | |
tree | 2b2ae9f36a463a479b9da1eb66205be2ff1b5777 | |
parent | ac2703b2735eef7338fd5ad2d2b0dd568f54a0af (diff) | |
download | fietsboek-48b4347ccad9b284967eee7017db4585c04e84cf.tar.gz fietsboek-48b4347ccad9b284967eee7017db4585c04e84cf.tar.bz2 fietsboek-48b4347ccad9b284967eee7017db4585c04e84cf.zip |
fix lints
-rw-r--r-- | fietsboek/views/browse.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fietsboek/views/browse.py b/fietsboek/views/browse.py index 83a58b3..678e207 100644 --- a/fietsboek/views/browse.py +++ b/fietsboek/views/browse.py @@ -36,18 +36,20 @@ class Stream(RawIOBase): def _get_int(request, name): try: return int(request.params.get(name)) - except ValueError: - raise HTTPBadRequest(f'Invalid integer in {name!r}') + except ValueError as exc: + raise HTTPBadRequest(f'Invalid integer in {name!r}') from exc + def _get_date(request, name): try: return datetime.date.fromisoformat(request.params.get(name)) - except ValueError: - raise HTTPBadRequest(f'Invalid date in {name!r}') + except ValueError as exc: + raise HTTPBadRequest(f'Invalid date in {name!r}') from exc class TrackFilters: """A filter that applies user-given filters to a track.""" + # pylint: disable=fixme # TODO: We should also do some of those in SQL, if possible. def __init__(self, filters): |