summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-04-19 05:39:23 (GMT)
committerSteven Knight <knight@baldmt.com>2010-04-19 05:39:23 (GMT)
commit7cc7b7c437b79c27354859b1d81f8338a6ce7a2d (patch)
treecaba9be1e5b44c8d07aad16f1e07fac0b12e787c /src/engine/SCons
parent3c89670aa4432fe14c22a87641f54e036d087290 (diff)
downloadSCons-7cc7b7c437b79c27354859b1d81f8338a6ce7a2d.zip
SCons-7cc7b7c437b79c27354859b1d81f8338a6ce7a2d.tar.gz
SCons-7cc7b7c437b79c27354859b1d81f8338a6ce7a2d.tar.bz2
Remove the compat version of the tempfile.mkstemp() function.
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/compat/__init__.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/engine/SCons/compat/__init__.py b/src/engine/SCons/compat/__init__.py
index 78dcf94..c1576da 100644
--- a/src/engine/SCons/compat/__init__.py
+++ b/src/engine/SCons/compat/__init__.py
@@ -257,41 +257,6 @@ except AttributeError:
sys.maxsize = (sys).maxint
-import tempfile
-try:
- tempfile.mkstemp
-except AttributeError:
- # Pre-2.3 Python has no tempfile.mkstemp function, so try to simulate it.
- # adapted from the mkstemp implementation in python 3.
- import os
- import errno
- def mkstemp(*args, **kw):
- text = False
- # TODO (1.5)
- #if 'text' in kw :
- if 'text' in kw.keys() :
- text = kw['text']
- del kw['text']
- elif len( args ) == 4 :
- text = args[3]
- args = args[:3]
- flags = os.O_RDWR | os.O_CREAT | os.O_EXCL
- if not text and hasattr( os, 'O_BINARY' ) :
- flags = flags | os.O_BINARY
- while True:
- try :
- name = tempfile.mktemp(*args, **kw)
- fd = os.open( name, flags, 0600 )
- return (fd, os.path.abspath(name))
- except OSError, e:
- if e.errno == errno.EEXIST:
- continue
- raise
-
- tempfile.mkstemp = mkstemp
- del mkstemp
-
-
if os.environ.get('SCONS_HORRIBLE_REGRESSION_TEST_HACK') is not None:
# We can't apply the 'callable' fixer until the floor is 2.6, but the
# '-3' option to Python 2.6 and 2.7 generates almost ten thousand