From 87f55cf11a916f8ed44689b3ef8ba25646053bda Mon Sep 17 00:00:00 2001 From: Will Greenberg Date: Wed, 1 May 2024 15:40:43 -0700 Subject: [PATCH] ci: appease the linter --- .../certbot_integration_tests/utils/pebble_artifacts.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py b/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py index de98d1697..ecefcb586 100644 --- a/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py +++ b/certbot-ci/certbot_integration_tests/utils/pebble_artifacts.py @@ -55,10 +55,10 @@ def _fetch_asset(asset: str, assets_path: str) -> str: def _unzip_asset(zipped_data: bytes, asset_name: str) -> Optional[bytes]: - zip_file = zipfile.ZipFile(io.BytesIO(zipped_data)) - for entry in zip_file.filelist: - if not entry.is_dir() and entry.filename.endswith(asset_name): - return zip_file.read(entry) + with zipfile.ZipFile(io.BytesIO(zipped_data)) as zip_file: + for entry in zip_file.filelist: + if not entry.is_dir() and entry.filename.endswith(asset_name): + return zip_file.read(entry) return None