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

@ -52,12 +52,12 @@ class GeometryField(models.TextField):
return None
try:
geometry = shape(json.loads(value))
except:
except Exception:
raise ValidationError(_('Invalid GeoJSON.'))
self._validate_geomtype(geometry)
try:
geometry = clean_geometry(geometry)
except:
except Exception:
raise ValidationError(_('Could not clean geometry.'))
self._validate_geomtype(geometry)
return geometry