diff options
| author | Martin Panter <vadmium+py@gmail.com> | 2016-02-29 11:25:09 (GMT) |
|---|---|---|
| committer | Martin Panter <vadmium+py@gmail.com> | 2016-02-29 11:25:09 (GMT) |
| commit | 93088d1b031a6a00474c13c44d130b7c078de35d (patch) | |
| tree | 39a4cb8647f87328dcbca65ef16b1c13e947c933 /Lib/tempfile.py | |
| parent | d047c2f8b2a4c25bd04f2536e9af24a9cc01ab77 (diff) | |
| parent | 7869a227795da08841f8139b69b7d4521b12e184 (diff) | |
| download | cpython-93088d1b031a6a00474c13c44d130b7c078de35d.zip cpython-93088d1b031a6a00474c13c44d130b7c078de35d.tar.gz cpython-93088d1b031a6a00474c13c44d130b7c078de35d.tar.bz2 | |
Issue #26385: Merge NamedTemporaryFile fix from 3.5
Diffstat (limited to 'Lib/tempfile.py')
| -rw-r--r-- | Lib/tempfile.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py index c39820e..ad687b9 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -552,7 +552,8 @@ def NamedTemporaryFile(mode='w+b', buffering=-1, encoding=None, newline=newline, encoding=encoding) return _TemporaryFileWrapper(file, name, delete) - except Exception: + except BaseException: + _os.unlink(name) _os.close(fd) raise |
