Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Add

    try:
        ...
    except:
        file.close()
        raise

----------
components: +IO, Library (Lib)
keywords: +easy
stage:  -> needs patch
type:  -> resource usage
versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to