Add .get_file_contents() to Value() nodes
authorGregNoel <GregNoel@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 22 Apr 2009 20:17:18 +0000 (20:17 +0000)
committerGregNoel <GregNoel@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 22 Apr 2009 20:17:18 +0000 (20:17 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4116 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Node/Python.py

index 132c425a590612bd2d0021b1e6de963db273e495..c44359495eba678c4cdbf157ac8dd34925cd58a4 100644 (file)
@@ -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: