Use the newer python syntax for exceptions

We've dropped support for python 2.5, so now we can use the forward
compatible "except ... as" syntax.

llvm-svn: 224181
This commit is contained in:
Justin Bogner 2014-12-13 02:46:56 +00:00
parent 8bcc05d5f4
commit efa6197ab7
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ set_default("emulator", "@COMPILER_RT_EMULATOR@")
# apply substitution.
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
except KeyError,e:
except KeyError as e:
key, = e.args
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))

View File

@ -17,7 +17,7 @@ config.host_os = "@HOST_OS@"
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
config.llvm_build_mode = config.llvm_build_mode % lit_config.params
except KeyError,e:
except KeyError as e:
key, = e.args
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))