summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-18 23:58:17 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-18 23:58:17 (GMT)
commit90ee7eb18eb1d9aecb4798ba06bf324db97b26b5 (patch)
tree23b64b71f0c82b78bd90f580886dc501a6b59d2d /Lib
parent9516609b6b1dec51195d1f3f9002f2dad2038e12 (diff)
downloadcpython-90ee7eb18eb1d9aecb4798ba06bf324db97b26b5.zip
cpython-90ee7eb18eb1d9aecb4798ba06bf324db97b26b5.tar.gz
cpython-90ee7eb18eb1d9aecb4798ba06bf324db97b26b5.tar.bz2
Record that FCNTL.py has gone away; remove FCNTL hack in tempfile.py;
another hack remains in test___all__.py, but the problem that one addresses is more general than *just* FCNTL, so leaving it alone.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/tempfile.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index ef6a1c5..ae2ed9e 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -38,17 +38,15 @@ if _os.name == 'mac':
try:
import fcntl as _fcntl
- # If PYTHONCASEOK is set on Windows, stinking FCNTL.py gets
- # imported, and we don't get an ImportError then. Provoke
- # an AttributeError instead in that case.
- _fcntl.fcntl
-except (ImportError, AttributeError):
+except ImportError:
def _set_cloexec(fd):
pass
else:
def _set_cloexec(fd):
- try: flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
- except IOError: pass
+ try:
+ flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
+ except IOError:
+ pass
else:
# flags read successfully, modify
flags |= _fcntl.FD_CLOEXEC