diff options
author | Gaurav Juvekar <gauravjuvekar@gmail.com> | 2017-04-10 18:31:37 (GMT) |
---|---|---|
committer | Gaurav Juvekar <gauravjuvekar@gmail.com> | 2017-04-10 18:31:37 (GMT) |
commit | 31383c850bc278c11c6020ce3f0704a402584a2d (patch) | |
tree | d12993dc1d343d9877ba4e4414c7dc22d944e911 /src/engine/SCons/Node | |
parent | c6281db8311345dbae895a498bd44b73600d4c0c (diff) | |
download | SCons-31383c850bc278c11c6020ce3f0704a402584a2d.zip SCons-31383c850bc278c11c6020ce3f0704a402584a2d.tar.gz SCons-31383c850bc278c11c6020ce3f0704a402584a2d.tar.bz2 |
py2/3 fix for test/Value.py
Diffstat (limited to 'src/engine/SCons/Node')
-rw-r--r-- | src/engine/SCons/Node/Python.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/engine/SCons/Node/Python.py b/src/engine/SCons/Node/Python.py index f151fc5..2a3ce98 100644 --- a/src/engine/SCons/Node/Python.py +++ b/src/engine/SCons/Node/Python.py @@ -58,7 +58,7 @@ class ValueNodeInfo(SCons.Node.NodeInfoBase): del state['__weakref__'] except KeyError: pass - + return state def __setstate__(self, state): @@ -77,7 +77,7 @@ class ValueBuildInfo(SCons.Node.BuildInfoBase): current_version_id = 2 class Value(SCons.Node.Node): - """A class for Python variables, typically passed on the command line + """A class for Python variables, typically passed on the command line or generated by a script, but not from a file or some other source. """ @@ -108,7 +108,7 @@ class Value(SCons.Node.Node): is_up_to_date = SCons.Node.Node.children_are_up_to_date def is_under(self, dir): - # Make Value nodes get built regardless of + # Make Value nodes get built regardless of # what directory scons was run from. Value nodes # are outside the filesystem: return 1 @@ -133,10 +133,11 @@ class Value(SCons.Node.Node): ###TODO: something reasonable about universal newlines contents = str(self.value) for kid in self.children(None): - contents = contents + kid.get_contents() + contents = contents + kid.get_contents().decode() return contents - get_contents = get_text_contents ###TODO should return 'bytes' value + def get_contents(self): + return self.get_text_contents().encode() def changed_since_last_build(self, target, prev_ni): cur_csig = self.get_csig() |