From 2fe7152a1e54804e8f52a9e2d7a01abec54a3d55 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 25 Sep 2016 15:34:28 +0200 Subject: [PATCH] Fix logic from 4a5b924d375461444c4fe2f61942a3febf37af1d (which was still wrong after 4410f91dad3a780f52da75bff0103832d7ed7f2b) --- scour/scour.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scour/scour.py b/scour/scour.py index e91d385..00d8c7b 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -3794,9 +3794,9 @@ def start(options, input, output): output.write(out_string) # Close input and output files (but do not attempt to close stdin/stdout!) - if not ((input is sys.stdin) or (hasattr(input, 'buffer') and input is sys.stdin.buffer)): + if not ((input is sys.stdin) or (hasattr(sys.stdin, 'buffer') and input is sys.stdin.buffer)): input.close() - if not ((output is sys.stdout) or (hasattr(output, 'buffer') and output is sys.stdout.buffer)): + if not ((output is sys.stdout) or (hasattr(sys.stdout, 'buffer') and output is sys.stdout.buffer)): output.close() end = walltime()