summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Defaults.py
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2013-09-22 17:08:12 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2013-09-22 17:08:12 (GMT)
commit953dc41b8b720fdcec7955de67d23206214e5125 (patch)
treeb95b2144ccf82d8227cec025af152f4eadfa7282 /src/engine/SCons/Defaults.py
parent328e541f40849c270fc75f0932594d18d2e6340b (diff)
downloadSCons-953dc41b8b720fdcec7955de67d23206214e5125.zip
SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.gz
SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.bz2
Result of raw 2to3 run (2to3-2.7); checkpoint for python3 conversion.
Diffstat (limited to 'src/engine/SCons/Defaults.py')
-rw-r--r--src/engine/SCons/Defaults.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index a99bcc7..fe1f87b 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -31,7 +31,7 @@ from distutils.msvccompiler.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-from __future__ import division
+
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
@@ -50,6 +50,7 @@ import SCons.Environment
import SCons.PathList
import SCons.Subst
import SCons.Tool
+import collections
# A placeholder for a default Environment (for fetching source files
# from source code management systems and the like). This must be
@@ -221,7 +222,7 @@ def mkdir_func(dest):
for entry in dest:
try:
os.makedirs(str(entry))
- except os.error, e:
+ except os.error as e:
p = str(entry)
if (e.args[0] == errno.EEXIST or
(sys.platform=='win32' and e.args[0]==183)) \
@@ -325,9 +326,9 @@ def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
if not itms:
return itms
- if not callable(c):
+ if not isinstance(c, collections.Callable):
env_c = env['_concat']
- if env_c != _concat and callable(env_c):
+ if env_c != _concat and isinstance(env_c, collections.Callable):
# There's a custom _concat() method in the construction
# environment, and we've allowed people to set that in
# the past (see test/custom-concat.py), so preserve the
@@ -381,7 +382,7 @@ def processDefines(defs):
else:
l.append(str(d[0]))
elif SCons.Util.is_Dict(d):
- for macro,value in d.iteritems():
+ for macro,value in d.items():
if value is not None:
l.append(str(macro) + '=' + str(value))
else: