Recognize new zip content type
Some checks reported errors
continuous-integration/drone/tag Build was killed
continuous-integration/drone/push Build is failing

This commit is contained in:
IamTheFij 2022-08-31 12:26:18 -07:00
parent 1b367f5ddb
commit fe0d9059aa

View File

@ -270,7 +270,10 @@ class PackageAdapter:
def __init__(self, content_type: str, response: requests.Response): def __init__(self, content_type: str, response: requests.Response):
self._package: Union[TarFile, ZipFile] self._package: Union[TarFile, ZipFile]
if content_type == "application/zip": if content_type in (
"application/zip",
"application/x-zip-compressed",
):
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)