[GRASS-git] [OSGeo/grass-addons] 59ab8a: g.download.location: Make unzip, untar more robust...

Vaclav Petras noreply at github.com
Thu Oct 15 18:41:46 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass-addons
  Commit: 59ab8a5817def0c6fa46be74019b95171ce05316
      https://github.com/OSGeo/grass-addons/commit/59ab8a5817def0c6fa46be74019b95171ce05316
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2020-10-15 (Thu, 15 Oct 2020)

  Changed paths:
    M grass7/general/g.download.location/g.download.location.html
    M grass7/general/g.download.location/g.download.location.py

  Log Message:
  -----------
  g.download.location: Make unzip, untar more robust (#301)

The module can now deal with location being only one of the nested directories for cases
when archiving program creates one extra. It recurses one level into the structure
(can be modified in the code) which adds additional level to what the Python libraries are doing
(which actually makes the code more complex for us).

xz is among the recognized extensions.

Several special cases and error are now handled gracefully with error being reported
for single file in an archive (typically another archive, but leaving that aside)
and for file being incomplete (likely not fully downloaded).

Functions raise an unified exception, main code now calls fatal when that happens.

Filenames without extension don't cause traceback, but cause an error to be reported.




More information about the grass-commit mailing list