Fix logic in previous commit
This commit is contained in:
parent
4a5b924d37
commit
4410f91dad
1 changed files with 4 additions and 6 deletions
|
|
@ -3759,11 +3759,9 @@ def start(options, input, output):
|
||||||
output.write(out_string)
|
output.write(out_string)
|
||||||
|
|
||||||
# Close input and output files (but do not attempt to close stdin/stdout!)
|
# Close input and output files (but do not attempt to close stdin/stdout!)
|
||||||
if input is not sys.stdin:
|
if not ((input is sys.stdin) or (hasattr(input, 'buffer') and input is sys.stdin.buffer)):
|
||||||
if hasattr(input, 'buffer') and input is not sys.stdin.buffer:
|
|
||||||
input.close()
|
input.close()
|
||||||
if output is not sys.stdout:
|
if not ((output is sys.stdout) or (hasattr(output, 'buffer') and output is sys.stdout.buffer)):
|
||||||
if hasattr(output, 'buffer') and output is not sys.stdout.buffer:
|
|
||||||
output.close()
|
output.close()
|
||||||
|
|
||||||
end = walltime()
|
end = walltime()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue