mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
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:
@@ -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))
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user