From 7144c5a91303e18ab6c1b128434f5454eff9e0af Mon Sep 17 00:00:00 2001 From: YellowTech Date: Mon, 11 Mar 2024 16:20:53 +0100 Subject: [PATCH] Fix export_mappings, return XML strings and not closed zip files --- .../airlock_gateway_rest_api_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/airlock_gateway_rest_api_lib/airlock_gateway_rest_api_lib.py b/src/airlock_gateway_rest_api_lib/airlock_gateway_rest_api_lib.py index 692f62c..eeabf82 100755 --- a/src/airlock_gateway_rest_api_lib/airlock_gateway_rest_api_lib.py +++ b/src/airlock_gateway_rest_api_lib/airlock_gateway_rest_api_lib.py @@ -569,7 +569,7 @@ def export_mappings(gw_session: GatewaySession, if res.status_code == 200: with ZipFile(BytesIO(res.content)) as zip_file: with zip_file.open("alec_table.xml", "r") as mapping_xml: - mapping_xmls.append(mapping_xml) + mapping_xmls.append(mapping_xml.read()) else: logging.info("Mapping with ID %s was not found on Airlock Host", mapping_id)