Skip to content

Commit

Permalink
Merge pull request #285 from mossmann/logic-stdout
Browse files Browse the repository at this point in the history
host: logic: fix bugs in binary output to stdout
  • Loading branch information
Qyriad authored Sep 13, 2019
2 parents 67c6421 + 5a8885e commit 3c67a81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion host/greatfet/commands/greatfet_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def background_process_data(termination_request, args, bus_width, bin_file, empt
if args.pulseview or args.binary:
bin_file.write(samples)
if args.write_to_stdout:
sys.stdout.write(samples)
sys.stdout.buffer.write(samples)

# ... and add the buffer back to our empty list.
empty_buffers.append(active_buffer)
Expand Down Expand Up @@ -210,6 +210,7 @@ def main():
# --quiet flag.
if args.write_to_stdout:
log_function = log_silent
bin_file = None
else:
log_function = parser.get_log_function()

Expand Down

0 comments on commit 3c67a81

Please sign in to comment.