summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2018-11-10 17:58:27 (GMT)
committerMats Wichmann <mats@linux.com>2018-12-01 16:28:01 (GMT)
commit776672af607e359468dc87e7efcca28260f70a7d (patch)
tree297045786218215b4587244415e8274d9f1951ae /src/script
parent1519a7d40f5e65c1c1c896c9c96456f8364c6907 (diff)
downloadSCons-776672af607e359468dc87e7efcca28260f70a7d.zip
SCons-776672af607e359468dc87e7efcca28260f70a7d.tar.gz
SCons-776672af607e359468dc87e7efcca28260f70a7d.tar.bz2
For PR #3238: use a try block for str/bytes problem
The previous fix changed a failing line that printed something that could be bytes in Py3 to do a decode. But it turned out that value can be either str or bytes and the change failed the sconsign tests. Use a try block instead of unconditionally calling decode. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/script')
-rw-r--r--src/script/sconsign.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/script/sconsign.py b/src/script/sconsign.py
index 42424a2..567dc07 100644
--- a/src/script/sconsign.py
+++ b/src/script/sconsign.py
@@ -453,7 +453,10 @@ class Do_SConsignDB(object):
@staticmethod
def printentries(dir, val):
- print('=== ' + dir.decode() + ':')
+ try:
+ print('=== ' + dir + ':')
+ except TypeError:
+ print('=== ' + dir.decode() + ':')
printentries(pickle.loads(val), dir)