summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2016-01-01 13:52:31 (GMT)
committerRussel Winder <russel@winder.org.uk>2016-01-01 13:52:31 (GMT)
commit34cf3bdb1743de9a5534bfd25998d0a01297f004 (patch)
tree95b6de82092af962dd5136c4017e7388bbb72aa2 /src/engine/SCons/Script
parent2a270c8f314e959c78e9deda29c8f250bb934dd6 (diff)
downloadSCons-34cf3bdb1743de9a5534bfd25998d0a01297f004.zip
SCons-34cf3bdb1743de9a5534bfd25998d0a01297f004.tar.gz
SCons-34cf3bdb1743de9a5534bfd25998d0a01297f004.tar.bz2
Run futurize --stage1.
Diffstat (limited to 'src/engine/SCons/Script')
-rw-r--r--src/engine/SCons/Script/Main.py6
-rw-r--r--src/engine/SCons/Script/SConscript.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py
index 71d64fc..7cc7d47 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, 6, 0)
deprecated_python_version = (2, 7, 0)
@@ -354,13 +356,13 @@ class CleanTask(SCons.Taskmaster.AlwaysTask):
for t in self._get_files_to_clean():
try:
removed = t.remove()
- except OSError, e:
+ except OSError as e:
# An OSError may indicate something like a permissions
# issue, an IOError would indicate something like
# the file not existing. In either case, print a
# message and keep going to try to remove as many
# targets as possible.
- print("scons: Could not remove '{}':".format(str(t)), e.strerror)
+ print(("scons: Could not remove '{}':".format(str(t)), e.strerror))
else:
if removed:
display("Removed " + str(t))
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index ab032be..6480ace 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -5,6 +5,8 @@ files.
"""
+from __future__ import print_function
+
#
# __COPYRIGHT__
#
@@ -68,7 +70,7 @@ def get_calling_namespaces():
"""Return the locals and globals for the function that called
into this module in the current call stack."""
try: 1//0
- except ZeroDivisionError:
+ except ZeroDivisionError:
# Don't start iterating with the current stack-frame to
# prevent creating reference cycles (f_back is safe).
frame = sys.exc_info()[2].tb_frame.f_back