Skip to content

Commit

Permalink
scylla_repository.py: attend to python 3.12 related warnings
Browse files Browse the repository at this point in the history
taking care about warnings around unsafe usage of the built-in tarlib
  • Loading branch information
fruch committed Nov 25, 2024
1 parent 7dc646f commit 96c0d2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ccmlib/scylla_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ def download_version(version, url=None, verbose=False, target_dir=None, unified=
if verbose:
print(f"Extracting {target} ({url}, {target_dir}) as version {version} ...")
tar = tarfile.open(target)
tar.extractall(path=target_dir)
if sys.version_info >= (3, 12):
kwargs = {'path': target_dir, 'filter': 'data'}
else:
kwargs = {'path': target_dir}
tar.extractall(**kwargs)
tar.close()

# if relocatable package format >= 2, need to extract files under subdir
Expand Down

0 comments on commit 96c0d2a

Please sign in to comment.