Fix double use of f.close().
Fix double use of f.close().

The other one is in a finally block not seen in the diff, which I added
in 3bf86785cd9c (for #10252).

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator