Closed zkwurst closed 7 years ago
Why do you need the d flag? It should download it by default.
Not sure. Just seemed intuitive to require the user to select one or the other? I can see myself always starting to download large amounts of data because I forgot to change it to "i". But you can always just cancel the module. Speaking of, it would probably be good to write a clean-up function for that scenario.
I see why you want this but it's not consistent with how similar modules and flags work in GRASS. We can always change it later.
Clean up would be good, for example for files which were not downloaded fully and for any temporary maps or files. For cleanup you need to put this in there:
atexit.register(cleanup)
and define the cleanup function. The atexit.register ensures the cleanup is called every time. Look for example here how it is used:
https://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.skyview/r.skyview.py https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_2/scripts/r.import/r.import.py
Very useful. Thank you.
How to write rule that does not allow both flags to get selected: