Skip to content

Commit

Permalink
lib/init/grass: Replace str.find() with faster "in" check for geostri…
Browse files Browse the repository at this point in the history
…ng in create_location
  • Loading branch information
echoix committed Nov 2, 2024
1 parent be4f524 commit 597b6a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/init/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def create_location(gisdbase, location, geostring):
from grass.script import core as gcore # pylint: disable=E0611

try:
if geostring and geostring.upper().find("EPSG:") > -1:
if geostring and "EPSG:" in geostring.upper():
# create location using EPSG code
epsg = geostring.split(":", 1)[1]
if ":" in epsg:
Expand Down

0 comments on commit 597b6a1

Please sign in to comment.