From: Daniel Dunbar Date: Fri, 9 Aug 2013 00:44:59 +0000 (+0000) Subject: [tests] Avoid deprecated except syntax. X-Git-Tag: llvmorg-3.4.0-rc1~6764 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f5f12110d916f0b775852d16735b9c8f5650b1d;p=platform%2Fupstream%2Fllvm.git [tests] Avoid deprecated except syntax. llvm-svn: 188041 --- diff --git a/clang/test/Unit/lit.site.cfg.in b/clang/test/Unit/lit.site.cfg.in index 9f4d224eb655..9765f08a8e50 100644 --- a/clang/test/Unit/lit.site.cfg.in +++ b/clang/test/Unit/lit.site.cfg.in @@ -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)) diff --git a/clang/test/lit.site.cfg.in b/clang/test/lit.site.cfg.in index 23eb8e228cce..cff1508fa143 100644 --- a/clang/test/lit.site.cfg.in +++ b/clang/test/lit.site.cfg.in @@ -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))