diff --git a/autospec/tarball.py b/autospec/tarball.py index 139b7b65..e1145328 100644 --- a/autospec/tarball.py +++ b/autospec/tarball.py @@ -24,8 +24,8 @@ import sys import tarfile import zipfile -import zstandard as zstd +import zstandard as zstd import download from util import do_regex, get_sha1sum, print_fatal, write_out @@ -83,7 +83,7 @@ def set_tar_prefix(self): else: print_fatal("Not a valid tar file.") sys.exit(1) - + def set_zst_prefix(self): """Determine prefix folder name of tar.zst file.""" with tarfile.open(fileobj=zstd.open(self.path, 'rb'), mode='r|') as content: @@ -146,6 +146,7 @@ def extract_zst(self, extraction_path): with tarfile.open(fileobj=zstd.open(self.path, 'rb'), mode='r|') as content: content.extractall(path=extraction_path) + def convert_version(ver_str, name): """Remove disallowed characters from the version.""" # banned substrings. It is better to remove these here instead of filtering