From 4631c0c43550e65bb4cb57a21b17c329966b2e03 Mon Sep 17 00:00:00 2001 From: Stefan Zimmermann Date: Tue, 1 Apr 2014 07:40:28 +0000 Subject: Main: No __future__.print_function (would affect exec()'d code). --- src/engine/SCons/Script/Main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index 8725530..0663c7a 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -10,7 +10,9 @@ some other module. If it's specific to the "scons" script invocation, it goes here. """ -from __future__ import print_function +# Would affect exec()'d site_init.py: +## from __future__ import print_function +from six import print_ unsupported_python_version = (2, 3, 0) deprecated_python_version = (2, 7, 0) @@ -339,7 +341,7 @@ class CleanTask(SCons.Taskmaster.AlwaysTask): except SCons.Errors.UserError as e: print(e) except (IOError, OSError) as e: - print("scons: Could not remove '%s':" % pathstr, e.strerror) + print_("scons: Could not remove '%s':" % pathstr, e.strerror) def show(self): target = self.targets[0] @@ -364,7 +366,7 @@ class CleanTask(SCons.Taskmaster.AlwaysTask): # the file not existing. In either case, print a # message and keep going to try to remove as many # targets aa possible. - print("scons: Could not remove '%s':" % str(t), e.strerror) + print_("scons: Could not remove '%s':" % str(t), e.strerror) else: if removed: display("Removed " + str(t)) @@ -798,7 +800,7 @@ def _load_all_site_scons_dirs(topdir, verbose=None): dirs=sysdirs + [topdir] for d in dirs: if verbose: # this is used by unit tests. - print("Loading site dir ", d) + print_("Loading site dir ", d) _load_site_scons_dir(d) def test_load_all_site_scons_dirs(d): -- cgit v0.12