summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-08-30 02:28:48 (GMT)
committerSteven Knight <knight@baldmt.com>2005-08-30 02:28:48 (GMT)
commita97365847f038cbdec09b24a129755bbccb126c0 (patch)
tree51b56957d154d104b856352cd37100ccd264b509 /src/engine
parent0f8064fbb31c680b4029dc2ffc4f0312b7ec766d (diff)
downloadSCons-a97365847f038cbdec09b24a129755bbccb126c0.zip
SCons-a97365847f038cbdec09b24a129755bbccb126c0.tar.gz
SCons-a97365847f038cbdec09b24a129755bbccb126c0.tar.bz2
Fix unicode encoder errors.
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Tool/msvc.py5
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()