Add additional recognized content types for extract
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build was killed

This commit is contained in:
IamTheFij 2022-03-10 16:43:58 -08:00
parent f1c0cb9c40
commit c8607d0207
2 changed files with 6 additions and 2 deletions

View File

@ -250,7 +250,11 @@ class PackageAdapter:
self._package = ZipFile(BytesIO(response.content))
elif content_type == "application/x-tar":
self._package = TarFile(fileobj=response.raw)
elif content_type in ("application/gzip", "application/x-tar+gzip"):
elif content_type in (
"application/gzip",
"application/x-tar+gzip",
"application/x-compressed-tar",
):
self._package = TarFile.open(fileobj=BytesIO(response.content), mode="r:*")
else:
raise ValueError(f"Unknown or unsupported content type {content_type}")

View File

@ -12,7 +12,7 @@ with open(path.join(here, "README.md"), encoding="utf-8") as f:
setup(
name="release-gitter",
version="0.4.1",
version="0.4.2",
description="Easily download releases from sites like Github and Gitea",
long_description=long_description,
long_description_content_type="text/markdown",