Skip to content

Commit

Permalink
r.colors.out_sld: check if input map exists (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
neteler committed Jan 24, 2022
1 parent df7009f commit 6b73579
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/raster/r.colors.out_sld/r.colors.out_sld.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def main():
style_name = options["style_name"] # done
map = options["map"] # done

# check if input file exists
if not grass.find_file(map)["file"]:
grass.fatal(_("Raster map <%s> not found") % map)

# Get map metadata
mapinfo = grass.parse_command("r.info", flags="e", map=map)

Expand Down

0 comments on commit 6b73579

Please sign in to comment.