Skip to content

Commit 675e1b4

Browse files
vawsgitrstrahan
authored andcommitted
Fix: tempfile without flush
1 parent b45dcdd commit 675e1b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/sdlc/idp-cli/src/idp_cli/util/s3_util.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2-
# SPDX-License-Identifier: MIT-0
3-
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: MIT-0
3+
44
import os
55
import io
66
from typing import Dict
@@ -279,6 +279,7 @@ def put_zip(bucket_name: str, object_name: str, relative_path: str):
279279
file_path = os.path.join(root, file)
280280
zipf.write(file_path, os.path.relpath(file_path, absolute_path))
281281

282+
temp_zip.flush()
282283
temp_zip_path = temp_zip.name
283284

284285
# Upload the ZIP file

0 commit comments

Comments
 (0)