mirror of https://github.com/django/django.git
[2.1.x] Fixed 'invalid escape sequence' warning in GEOSGeometryBase.from_ewkt().
Backport of 7a266e25be
from master.
This commit is contained in:
parent
69e2d173e5
commit
bdc71f526f
|
@ -113,7 +113,7 @@ class GEOSGeometryBase(GEOSBase):
|
|||
parts = ewkt.split(b';', 1)
|
||||
if len(parts) == 2:
|
||||
srid_part, wkt = parts
|
||||
match = re.match(b'SRID=(?P<srid>\-?\d+)', srid_part)
|
||||
match = re.match(br'SRID=(?P<srid>\-?\d+)', srid_part)
|
||||
if not match:
|
||||
raise ValueError('EWKT has invalid SRID part.')
|
||||
srid = int(match.group('srid'))
|
||||
|
|
Loading…
Reference in New Issue