summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node
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/Node
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/Node')
-rw-r--r--src/engine/SCons/Node/FS.py10
-rw-r--r--src/engine/SCons/Node/FSTests.py4
-rw-r--r--src/engine/SCons/Node/__init__.py4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
index 22dca1f..91c6893 100644
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -31,6 +31,7 @@ that can be used by scripts or modules looking for the canonical default.
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# 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 print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
@@ -54,7 +55,6 @@ import SCons.Util
import SCons.Warnings
from SCons.Debug import Trace
-import collections
do_store_info = True
print_duplicate = 0
@@ -1509,7 +1509,7 @@ class Dir(Base):
This clears any cached information that is invalidated by changing
the repository."""
- for node in list(self.entries.values()):
+ for node in self.entries.values():
if node != self.dir:
if node != self and isinstance(node, Dir):
node.__clearRepositoryCache(duplicate)
@@ -2056,7 +2056,7 @@ class Dir(Base):
# We use the .name attribute from the Node because the keys of
# the dir.entries dictionary are normalized (that is, all upper
# case) on case-insensitive systems like Windows.
- node_names = [ v.name for k, v in list(dir.entries.items())
+ node_names = [ v.name for k, v in dir.entries.items()
if k not in ('.', '..') ]
names.extend(node_names)
if not strings:
@@ -3197,10 +3197,10 @@ class FileFinder(object):
except KeyError:
pass
- if verbose and not isinstance(verbose, collections.Callable):
+ if verbose and not callable(verbose):
if not SCons.Util.is_String(verbose):
verbose = "find_file"
- _verbose = ' %s: ' % verbose
+ _verbose = u' %s: ' % verbose
verbose = lambda s: sys.stdout.write(_verbose + s)
filedir, filename = os.path.split(filename)
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index e8442e9..66803f9 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -20,7 +20,7 @@
# 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, print_function
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
@@ -1305,7 +1305,7 @@ class FSTestCase(_tempdirTestCase):
assert f1.get_contents() == "Foo\x1aBar", f1.get_contents()
# This tests to make sure we can decode UTF-8 text files.
- test_string = "Foo\x1aBar"
+ test_string = u"Foo\x1aBar"
test.write("utf8_file", test_string.encode('utf-8'))
f1 = fs.File(test.workpath("utf8_file"))
assert eval('f1.get_text_contents() == u"Foo\x1aBar"'), \
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index 8f48d86..7f5d7ff 100644
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -1197,8 +1197,8 @@ class Node(object):
new_bkids = new.bsources + new.bdepends + new.bimplicit
new_bkidsigs = new.bsourcesigs + new.bdependsigs + new.bimplicitsigs
- osig = dict(list(zip(old_bkids, old_bkidsigs)))
- nsig = dict(list(zip(new_bkids, new_bkidsigs)))
+ osig = dict(zip(old_bkids, old_bkidsigs))
+ nsig = dict(zip(new_bkids, new_bkidsigs))
# The sources and dependencies we'll want to report are all stored
# as relative paths to this target's directory, but we want to