remove bare exceptions

This commit is contained in:
Laura Klünder 2017-10-25 00:47:40 +02:00
parent abfdd3df29
commit 6ed5188c07
3 changed files with 4 additions and 4 deletions

View file

@ -41,7 +41,7 @@ def changeset_detail(request, pk):
if changeset.can_edit(request):
try:
changed_object = changeset.changed_objects_set.get(pk=restore)
except:
except Exception:
pass
else:
try:

View file

@ -487,7 +487,7 @@ class BaseQueryWrapper(BaseWrapper):
# so… is this a multi-level-lookup?
try:
rel_model._meta.get_field(filter_type)
except:
except Exception:
raise NotImplementedError('Unsupported lookup or %s has no field "%s".' % (rel_model, filter_type))
# multi-level-lookup