From: cournape Date: Thu, 19 Nov 2009 05:04:17 +0000 (+0000) Subject: BUG: catch error while canonalizing arch for host/target. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c60e444286f3668712275e471c58673d2d70cf71;p=scons.git BUG: catch error while canonalizing arch for host/target. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4452 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 623c5116..ee4ebe64 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"]