[2.1.x] Fixed 'invalid escape sequence' warning in GEOSGeometryBase.from_ewkt().

Backport of 7a266e25be from master.
This commit is contained in:
Tim Graham 2018-06-09 03:27:33 -04:00 committed by Claude Paroz
parent 69e2d173e5
commit bdc71f526f
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class GEOSGeometryBase(GEOSBase):
parts = ewkt.split(b';', 1) parts = ewkt.split(b';', 1)
if len(parts) == 2: if len(parts) == 2:
srid_part, wkt = parts 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: if not match:
raise ValueError('EWKT has invalid SRID part.') raise ValueError('EWKT has invalid SRID part.')
srid = int(match.group('srid')) srid = int(match.group('srid'))