summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2013-11-22 13:07:53 +0100
committerFlorian Bruhin <git@the-compiler.org>2013-11-22 13:08:48 +0100
commitc3083531318f97040cb9791c55673d54b32a8ce2 (patch)
treeb1792dbf57d504bc2b8d9a6ec89ddecb8fa7c729
parentd025871cbaf12e0173b81b697f6661307557a5a6 (diff)
downloadpyrmlint-c3083531318f97040cb9791c55673d54b32a8ce2.tar.gz
pyrmlint-c3083531318f97040cb9791c55673d54b32a8ce2.zip
Simplify writing to stdout
-rw-r--r--pyrmlint.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pyrmlint.py b/pyrmlint.py
index 338854b..7f46fdc 100644
--- a/pyrmlint.py
+++ b/pyrmlint.py
@@ -54,9 +54,10 @@ def main():
r.parse(f)
for pair in r.duplicates:
for fobj in pair:
- sys.stdout.buffer.write(fobj.path)
- sys.stdout.buffer.write(b'\n')
- sys.stdout.buffer.write(b'\n')
+ # we want to treat the filename as binary
+ sys.stdout.buffer.write(fobj.path + b'\n')
+ sys.stdout.flush()
+ print()
if __name__ == '__main__':
main()