summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node/Python.py
diff options
context:
space:
mode:
authorGreg Noel <GregNoel@tigris.org>2009-04-22 20:17:18 (GMT)
committerGreg Noel <GregNoel@tigris.org>2009-04-22 20:17:18 (GMT)
commit222ddc9ae4b8123f451d976a4d8d8b1d57e9ffd0 (patch)
treed600cc0316604e0b5c54e7fa1f6a9d333ff020b3 /src/engine/SCons/Node/Python.py
parent3e1084d74cc69638fab3156541886174906b4579 (diff)
downloadSCons-222ddc9ae4b8123f451d976a4d8d8b1d57e9ffd0.zip
SCons-222ddc9ae4b8123f451d976a4d8d8b1d57e9ffd0.tar.gz
SCons-222ddc9ae4b8123f451d976a4d8d8b1d57e9ffd0.tar.bz2
Add .get_file_contents() to Value() nodes
Diffstat (limited to 'src/engine/SCons/Node/Python.py')
-rw-r--r--src/engine/SCons/Node/Python.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py
index 132c425..c443594 100644
--- a/src/engine/SCons/Node/Python.py
+++ b/src/engine/SCons/Node/Python.py
@@ -88,17 +88,20 @@ class Value(SCons.Node.Node):
self.built_value = self.value
return self.built_value
- def get_contents(self):
+ def get_text_contents(self):
"""By the assumption that the node.built_value is a
deterministic product of the sources, the contents of a Value
are the concatenation of all the contents of its sources. As
the value need not be built when get_contents() is called, we
cannot use the actual node.built_value."""
+ ###TODO: something reasonable about universal newlines
contents = str(self.value)
for kid in self.children(None):
contents = contents + kid.get_contents()
return contents
+ get_contents = get_text_contents ###TODO should return 'bytes' value
+
def changed_since_last_build(self, target, prev_ni):
cur_csig = self.get_csig()
try: