summaryrefslogtreecommitdiffstats
path: root/SCons/Node
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-10-13 23:48:35 (GMT)
committerMats Wichmann <mats@linux.com>2020-10-13 23:48:35 (GMT)
commit2cdc9dd4c9503c0f9e15c0cf636661fc99c9eeca (patch)
treeeb5a25f4c53e009730cab5e813c5669ace2076d6 /SCons/Node
parent60dfff82a334b07f3f409fe78cbb8771ebf738f1 (diff)
downloadSCons-2cdc9dd4c9503c0f9e15c0cf636661fc99c9eeca.zip
SCons-2cdc9dd4c9503c0f9e15c0cf636661fc99c9eeca.tar.gz
SCons-2cdc9dd4c9503c0f9e15c0cf636661fc99c9eeca.tar.bz2
[PR #3815] change per reveiw: drop unneeded try block in Python node
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Node')
-rw-r--r--SCons/Node/Python.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/SCons/Node/Python.py b/SCons/Node/Python.py
index 95fd274..0eab05c 100644
--- a/SCons/Node/Python.py
+++ b/SCons/Node/Python.py
@@ -143,19 +143,14 @@ class Value(SCons.Node.Node):
def get_contents(self) -> bytes:
"""Get contents for signature calculations."""
- text_contents = self.get_text_contents()
- try:
- return text_contents.encode()
- except AttributeError:
- # Should not happen, as get_text_contents returns str
- return text_contents
+ return self.get_text_contents().encode()
def changed_since_last_build(self, target, prev_ni):
cur_csig = self.get_csig()
try:
return cur_csig != prev_ni.csig
except AttributeError:
- return 1
+ return True
def get_csig(self, calc=None):
"""Because we're a Python value node and don't have a real