summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script/Main.py
diff options
context:
space:
mode:
authorStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:13:02 (GMT)
committerStefan Zimmermann <zimmermann.code@gmail.com>2014-03-31 15:13:02 (GMT)
commit1a1a11122ad28df19d305af879ba79a2b08ce7d4 (patch)
tree4464eb544fe0cc698ea4d1c5789e19770b83cd6f /src/engine/SCons/Script/Main.py
parent9f36c5b899b8d2d54cae8d3da76b01308c144ed6 (diff)
downloadSCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.zip
SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.tar.gz
SCons-1a1a11122ad28df19d305af879ba79a2b08ce7d4.tar.bz2
Made former 2to3 changes Python 2.7 compatible (or removed unneeded changes).
Diffstat (limited to 'src/engine/SCons/Script/Main.py')
-rw-r--r--src/engine/SCons/Script/Main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 9a52937..584960b 100644
--- a/src/engine/SCons/Script/Main.py
+++ b/src/engine/SCons/Script/Main.py
@@ -10,6 +10,8 @@ some other module. If it's specific to the "scons" script invocation,
it goes here.
"""
+from __future__ import print_function
+
unsupported_python_version = (2, 3, 0)
deprecated_python_version = (2, 7, 0)
@@ -68,7 +70,6 @@ import SCons.Util
import SCons.Warnings
import SCons.Script.Interactive
-import collections
def fetch_win32_parallel_msg():
# A subsidiary function that exists solely to isolate this import
@@ -105,7 +106,7 @@ class Progressor(object):
self.interval = interval
self.overwrite = overwrite
- if isinstance(obj, collections.Callable):
+ if callable(obj):
self.func = obj
elif SCons.Util.is_List(obj):
self.func = self.spinner
@@ -716,7 +717,7 @@ def _load_site_scons_dir(topdir, site_dir_name=None):
modname = os.path.basename(pathname)[:-len(sfx)]
site_m = {"__file__": pathname, "__name__": modname, "__doc__": None}
re_special = re.compile("__[^_]+__")
- for k in list(m.__dict__.keys()):
+ for k in m.__dict__.keys():
if not re_special.match(k):
site_m[k] = m.__dict__[k]