[tests] Avoid deprecated except syntax.

llvm-svn: 188041
This commit is contained in:
Daniel Dunbar 2013-08-09 00:44:59 +00:00
parent 6465325e42
commit 4f5f12110d
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,5 @@
import sys
## Autogenerated by LLVM/Clang configuration.
# Do not edit!
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
@ -18,7 +20,8 @@ try:
config.llvm_tools_dir = config.llvm_tools_dir % lit.params
config.llvm_libs_dir = config.llvm_libs_dir % lit.params
config.llvm_build_mode = config.llvm_build_mode % lit.params
except KeyError,e:
except KeyError:
e = sys.exc_info()[1]
key, = e.args
lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))

View File

@ -1,3 +1,5 @@
import sys
## Autogenerated by LLVM/Clang configuration.
# Do not edit!
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
@ -14,7 +16,8 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit.params
config.llvm_libs_dir = config.llvm_libs_dir % lit.params
except KeyError,e:
except KeyError:
e = sys.exc_info()[1]
key, = e.args
lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))