fix(remarshal): do not close standard output

This commit is contained in:
D. Bohdan 2023-07-19 03:31:01 +00:00
parent 0284a54d78
commit b4755ab7b6
1 changed files with 1 additions and 3 deletions

View File

@ -547,12 +547,10 @@ def remarshal(
else:
encoded = output_data.encode("utf-8")
output_file.write(encoded)
output_file.close()
finally:
if "input_file" in locals():
input_file.close()
if "output_file" in locals():
if output != "-" and "output_file" in locals():
output_file.close()