diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-19 23:35:28 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-19 23:35:28 (GMT) |
commit | 42bbf67f813abf2af05eb9b25c3de7e1ba64fe9c (patch) | |
tree | d1b82fa46e66d1fa083f4aa5c44b9a529b01ee97 | |
parent | aa0997f21bfe2d338601fe14108fb24b3655b9b1 (diff) | |
download | SCons-42bbf67f813abf2af05eb9b25c3de7e1ba64fe9c.zip SCons-42bbf67f813abf2af05eb9b25c3de7e1ba64fe9c.tar.gz SCons-42bbf67f813abf2af05eb9b25c3de7e1ba64fe9c.tar.bz2 |
py2/3 get_text_contents() may be working when contents is a string (Value node), in which case the final except should handle AttributeError as decode is not a method on strings in py3
-rw-r--r-- | src/engine/SCons/Node/FS.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 7172c50..f455edb 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -2680,7 +2680,7 @@ class File(Base): return contents[len(codecs.BOM_UTF16_BE):].decode('utf-16-be') try: return contents.decode() - except UnicodeDecodeError: + except (UnicodeDecodeError, AttributeError) as e: return contents |