def _attempt_to_close_capture_file(f):
if six.PY2:<EOL><INDENT>try:<EOL><INDENT>f.close()<EOL><DEDENT>except IOError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>f.close()<EOL><DEDENT>
Suppress IOError when closing the temporary file used for capturing streams in py27 (#2370)