Skip to content

Commit

Permalink
build/tools: filter with line buffering
Browse files Browse the repository at this point in the history
jordens committed Oct 27, 2016
1 parent 6a78891 commit 73c607a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migen/build/tools.py
Original file line number Diff line number Diff line change
@@ -58,7 +58,8 @@ def sub_rules(lines, rules, max_matches=1):

def subprocess_call_filtered(command, rules, *, max_matches=1, **kwargs):
proc = subprocess.Popen(command, stdout=subprocess.PIPE,
universal_newlines=True, **kwargs)
universal_newlines=True, bufsize=1,
**kwargs)
with proc:
for line in sub_rules(iter(proc.stdout.readline, ""),
rules, max_matches):

0 comments on commit 73c607a

Please sign in to comment.