Skip to content

Commit

Permalink
Flush buffer in streaming interface before writing zip data (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanemcd committed Nov 9, 2022
1 parent 6f96ff5 commit 50ca6ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ansible_runner/utils/streaming.py
Expand Up @@ -51,6 +51,7 @@ def stream_dir(source_directory, stream):
else:
target = stream
target.write(json.dumps({"zipfile": zip_size}).encode("utf-8") + b"\n")
target.flush()
with Base64IO(target) as encoded_target:
for line in source:
encoded_target.write(line)
Expand Down

0 comments on commit 50ca6ea

Please sign in to comment.