Commit 8a9d9adc authored by Tom van Bussel's avatar Tom van Bussel

Merge branch 'fix/flake8-bare-except' into 'master'

Remove bare except clauses

See merge request !617
parents c4a1e72f 28d76bcf
......@@ -34,7 +34,7 @@ def _extract_date_range(request):
end = timezone.make_aware(
datetime.strptime(request.query_params['end'], '%Y-%m-%d')
)
except:
except Exception:
raise ParseError(detail='start or end query parameters invalid')
return end, start
......
......@@ -63,7 +63,7 @@ class MemberViewset(viewsets.ReadOnlyModelViewSet):
end = timezone.make_aware(
datetime.strptime(request.query_params['end'], '%Y-%m-%d')
)
except:
except Exception:
raise ParseError(detail='start or end query parameters invalid')
queryset = (
......
......@@ -21,7 +21,7 @@ def _extract_date_range(request):
end = timezone.make_aware(
datetime.strptime(request.query_params['end'], '%Y-%m-%d')
)
except:
except Exception:
raise ParseError(detail='start or end query parameters invalid')
return end, start
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment