Opened 2 years ago

Last modified 23 months ago

#3828 new enhancement

pygrass.gis.Region.from_* should raise a ValueError if the specified map does not exist.

Reported by: pmav99 Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: PyGRASS Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified


I think it would be better if


would raise a ValueError if the specified map name cannot be found. With the current implementation, the region remains unchanged and you have no clue about that:

Note, it might make sense to raise the Exception from within get_mapset_raster() but that function is used in more places and I haven't checked if this will break anything.

Change History (2)

comment:1 Changed 2 years ago by neteler

A patch would be appreciated.

comment:2 Changed 23 months ago by neteler

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.