diff options
| author | David Cournapeau <cournape@gmail.com> | 2009-11-19 05:04:17 (GMT) |
|---|---|---|
| committer | David Cournapeau <cournape@gmail.com> | 2009-11-19 05:04:17 (GMT) |
| commit | 6e73eb5a3bf57b248cca1cde9c4aa648760eb929 (patch) | |
| tree | 73a6b3a01a8b23c6bed4a754ead6769e7fd45251 /src/engine | |
| parent | 88dc7119c4ef49b3b2acee7f650d333a32ca4b2d (diff) | |
| download | SCons-6e73eb5a3bf57b248cca1cde9c4aa648760eb929.zip SCons-6e73eb5a3bf57b248cca1cde9c4aa648760eb929.tar.gz SCons-6e73eb5a3bf57b248cca1cde9c4aa648760eb929.tar.bz2 | |
BUG: catch error while canonalizing arch for host/target.
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/SCons/Tool/MSCommon/vc.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 623c511..ee4ebe6 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -73,8 +73,17 @@ def get_host_target(env): if not target_platform: target_platform = host_platform - return (_ARCH_TO_CANONICAL[host_platform], - _ARCH_TO_CANONICAL[target_platform]) + try: + host = _ARCH_TO_CANONICAL[host_platform] + except KeyError, e: + raise ValueError("Unrecognized host architecture %s" % host_platform) + + try: + target = _ARCH_TO_CANONICAL[target_platform] + except KeyError, e: + raise ValueError("Unrecognized target architecture %s" % target_platform) + + return (host, target) _VCVER = ["10.0", "9.0", "8.0", "7.1", "7.0", "6.0"] |
