From: GregNoel Date: Wed, 22 Apr 2009 20:17:18 +0000 (+0000) Subject: Add .get_file_contents() to Value() nodes X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=93ae2637a66e5079b732da566f2329c0647178a3;p=scons.git Add .get_file_contents() to Value() nodes git-svn-id: http://scons.tigris.org/svn/scons/trunk@4116 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py index 132c425a..c4435949 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: