Skip to content

Commit

Permalink
Fix bytes/str encode/decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Florin Iucha committed Feb 6, 2020
1 parent 0f3424b commit 4be2d0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3641,7 +3641,7 @@ def write_output(input_file, default_output_extension, source_func, mode="binary
outf.write(i)
else:
for i in source_func():
sys.stdout.buffer.write(i.decode("utf-8"))
sys.stdout.buffer.write(i)
else:
if output_file:
os.makedirs(os.path.dirname(output_file), exist_ok=True)
Expand All @@ -3650,7 +3650,7 @@ def write_output(input_file, default_output_extension, source_func, mode="binary
outf.write(i)
else:
for i in source_func():
sys.stdout.buffer.write(i)
sys.stdout.buffer.write(i.encode())

return output_file

Expand Down

0 comments on commit 4be2d0f

Please sign in to comment.