Add additional recognized content types for extract
This commit is contained in:
parent
f1c0cb9c40
commit
c8607d0207
@ -250,7 +250,11 @@ class PackageAdapter:
|
|||||||
self._package = ZipFile(BytesIO(response.content))
|
self._package = ZipFile(BytesIO(response.content))
|
||||||
elif content_type == "application/x-tar":
|
elif content_type == "application/x-tar":
|
||||||
self._package = TarFile(fileobj=response.raw)
|
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:*")
|
self._package = TarFile.open(fileobj=BytesIO(response.content), mode="r:*")
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unknown or unsupported content type {content_type}")
|
raise ValueError(f"Unknown or unsupported content type {content_type}")
|
||||||
|
2
setup.py
2
setup.py
@ -12,7 +12,7 @@ with open(path.join(here, "README.md"), encoding="utf-8") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="release-gitter",
|
name="release-gitter",
|
||||||
version="0.4.1",
|
version="0.4.2",
|
||||||
description="Easily download releases from sites like Github and Gitea",
|
description="Easily download releases from sites like Github and Gitea",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
Loading…
Reference in New Issue
Block a user