Skip to content

Commit 6e1f641

Browse files
Fix Python deprecation warning
1 parent c8317a7 commit 6e1f641

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/fetch-artifact.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ def main() -> None:
161161

162162
print("extracting {} to {}".format(archive_file, args.output_dir), file=sys.stderr)
163163
open_archive.seek(0)
164-
tarfile.open(fileobj=open_archive).extractall(path=args.output_dir)
164+
tar = tarfile.open(fileobj=open_archive)
165+
# Trust the contents because we checked the hash
166+
tar.extraction_filter = (lambda member, path: member)
167+
tar.extractall(path=args.output_dir)
168+
tar.close()
165169

166170

167171
main()

0 commit comments

Comments
 (0)