mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 18:22:37 +02:00
FIXUP: Fix a deprecation warning for filter=
This commit is contained in:
parent
c37ff7322d
commit
149ba235d9
1 changed files with 6 additions and 0 deletions
|
@ -77,6 +77,12 @@ def main():
|
|||
for lang in langs_short:
|
||||
member = f"tessdata_fast-{tag}/{lang}.traineddata"
|
||||
logger.info(f"Extracting {member}")
|
||||
# NOTE: We want `filter="data"` because it ignores ownership info, as
|
||||
# recorded in the tarfile. This filter will become the default in Python
|
||||
# 3.14. See:
|
||||
#
|
||||
# https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter
|
||||
t.extract(member=member, path=share_dir, filter="data")
|
||||
|
||||
tessdata_dl_dir = share_dir / f"tessdata_fast-{tag}"
|
||||
tessdata_dl_dir.rename(tessdata_dir)
|
||||
|
|
Loading…
Reference in a new issue