Skip to content

Commit

Permalink
Fixed bare except
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr committed Oct 24, 2023
1 parent fc3d071 commit 59b6101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion traveltimepy/dto/responses/time_map_wkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pydantic import BaseModel, Field, validator
from pydantic.generics import GenericModel
from shapely import wkt
from shapely.errors import WKTReadingError

Props = TypeVar("Props", bound=Union[Dict[str, Any], BaseModel])

Expand All @@ -14,7 +15,7 @@ def validate_wkt(cls, value: str) -> str:
try:
wkt.loads(value)
return value
except:
except WKTReadingError:
raise ValueError("Invalid WKT string")


Expand Down

0 comments on commit 59b6101

Please sign in to comment.