diff options
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 |