diff --git a/Lib/tempfile.py b/Lib/tempfile.py index ed107f4ea88..3ec6b4a3da9 100644 --- a/Lib/tempfile.py +++ b/Lib/tempfile.py @@ -87,10 +87,7 @@ def _set_cloexec(fd): # Fallback. All we need is something that raises OSError if the # file doesn't exist. def _stat(fn): - try: - f = open(fn) - except OSError: - raise OSError + f = open(fn) f.close() def _exists(fn):