Commit 28d76bcf authored by Tom van Bussel's avatar Tom van Bussel

Remove bare except clauses

A new check in flake8 complains about them.
parent c4a1e72f
......@@ -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