summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index fba9407..5ab5433 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -410,9 +410,9 @@ def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",
file = _os.fdopen(fd, mode, bufsize)
return _TemporaryFileWrapper(file, name)
-if _os.name != 'posix':
- # On non-POSIX systems, assume that we cannot unlink a file while
- # it is open.
+if _os.name != 'posix' or _os.sys.platform == 'cygwin':
+ # On non-POSIX and Cygwin systems, assume that we cannot unlink a file
+ # while it is open.
TemporaryFile = NamedTemporaryFile
else: