Skip to content

Commit

Permalink
init: Do not report creating new mapset for tmp mapset (OSGeo#2972)
Browse files Browse the repository at this point in the history
When running grass with --tmp-mapset, printing a message about mapset creation is not needed. Mapset is created and then deleted just as the user asked.
  • Loading branch information
wenzeslaus committed May 23, 2023
1 parent 19266d2 commit 860147a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/init/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -1185,9 +1185,12 @@ def set_mapset(
" Did you mean to create a new location?"
).format(mapset=mapset, geofile=geofile)
)
message(
_("Creating new GRASS GIS mapset <{}>...").format(mapset)
)
if not tmp_mapset:
message(
_("Creating new GRASS GIS mapset <{}>...").format(
mapset
)
)
# create mapset directory
os.mkdir(path)
if tmp_mapset:
Expand Down

0 comments on commit 860147a

Please sign in to comment.