[GRASS-dev] [GRASS GIS] #2925: Fail early in r.modis.download when omitting folder
GRASS GIS
trac at osgeo.org
Wed Feb 17 08:59:27 PST 2016
#2925: Fail early in r.modis.download when omitting folder
------------------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Addons | Version: unspecified
Keywords: r.modis.download | CPU: Unspecified
Platform: Unspecified |
------------------------------+-------------------------
According to `r.modis.download` documentation
> By default, the downloaded files are stored in the path where the
setting file is saved. The user can change this directory with folder
option. The user has to set the folder option if user and password are
sent by standard input.
If you specify the `username/password` from stdin and omit `folder` then
you get the following traceback
{{{
r.modis.download
settings=/home/grassuser/grassdata/modis/PERMANENT/.tmp/fa83d4fcd2cd/193.0
startday=2016-02-14 endday=2016-02-14
WARNING: Option 'tiles' not set. Downloading all available tiles
Traceback (most recent call last):
File "/home/grassuser/.grass7/addons/scripts/r.modis.download", line
248, in <module>
sys.exit(main())
File "/home/grassuser/.grass7/addons/scripts/r.modis.download", line
227, in main
modisOgg.connect()
File "/home/grassuser/.grass7/addons/etc/r.modis/downmodis.py", line
311, in connect
if len(self.dirData) == 0:
AttributeError: downModis instance has no attribute 'dirData'
(Wed Feb 17 16:45:04 2016) Command finished (11 min 17 sec)
}}}
I think that it might make sense to add an early check instead of waiting
for such a long time before aborting.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2925>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list