Skip to content

Commit

Permalink
grass.temporal.stds_import: Add extract filter for tar.extractall
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Jan 8, 2024
1 parent 5e86482 commit e167cdc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/grass/temporal/stds_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ def import_stds(
gscript.fatal(_("Unable to find projection file <%s>") % proj_file_name)

msgr.message(_("Extracting data..."))
tar.extractall(path=directory)
# Extraction filters were added in Python 3.12,
# and backported to 3.8.17, 3.9.17, 3.10.12, and 3.11.4
# See https://docs.python.org/3.12/library/tarfile.html#tarfile-extraction-filter
tar.extractall(path=directory, filter='data')
tar.close()

# We use a new list file name for map registration
Expand Down

0 comments on commit e167cdc

Please sign in to comment.