diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Tool/msvc.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py index 1077931..d6ecbfa 100644 --- a/src/engine/SCons/Tool/msvc.py +++ b/src/engine/SCons/Tool/msvc.py @@ -80,10 +80,9 @@ def _parse_msvc7_overrides(version): try: f = codecs.open(comps, 'r', 'utf16') encoder = codecs.getencoder('ascii') - except LookupError: - lines = codecs.open(comps, 'r', 'utf8').readlines() - else: lines = map(lambda l, e=encoder: e(l)[0], f.readlines()) + except (LookupError, UnicodeError): + lines = codecs.open(comps, 'r', 'utf8').readlines() if lines is None: lines = open(comps, 'r').readlines() |