Add a flush

This commit is contained in:
Anthony Sottile 2017-10-18 14:46:38 -07:00
parent 8a98c5e590
commit 9567db66e5

View file

@ -18,6 +18,7 @@ def _check_filename(filename):
for i, line in enumerate(f, 1):
if GITHUB_NON_PERMALINK.search(line):
sys.stdout.write('{}:{}:'.format(filename, i))
sys.stdout.flush()
getattr(sys.stdout, 'buffer', sys.stdout).write(line)
retv = 1
return retv