Skip to content

Commit 40936b3

Browse files
committed
made printing the response into a file binary-safe
1 parent 93979b0 commit 40936b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
1010

1111
[project]
1212
name = "recodex_cli_eceltov"
13-
version = "0.0.20"
13+
version = "0.0.21"
1414
authors = [
1515
{ name="Vojtech Kloda", email="[email protected]" },
1616
]

src/recodex_cli/call_command/response_printer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ def print_response(response: ClientResponse, state: CommandState):
3131
else:
3232
print(out_string, end="")
3333
else:
34-
with open(state.output_path, "w") as handle:
35-
handle.write(out_string)
34+
with open(state.output_path, "wb") as handle:
35+
handle.write(out_string.encode('utf-8'))

0 commit comments

Comments
 (0)