1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

Fixed #21189: Cleaned up usage of bare except clauses.

Thanks to berkerpeksag for the report and to claudep
for the review.
This commit is contained in:
Baptiste Mispelon
2013-09-30 17:55:14 +02:00
parent 948d209ada
commit 20472aa827
17 changed files with 39 additions and 39 deletions

View File

@@ -73,7 +73,7 @@ class GeometryField(forms.Field):
elif self.srid != -1 and self.srid != geom.srid:
try:
geom.transform(self.srid)
except:
except GEOSException:
raise forms.ValidationError(self.error_messages['transform_error'], code='transform_error')
return geom