From: Daniel Dunbar Date: Wed, 7 Aug 2013 23:09:10 +0000 (+0000) Subject: [tests] Avoid deprecated except syntax. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4229b95d66ce3757b1ef8691da2ef6e9f329b38d;p=oota-llvm.git [tests] Avoid deprecated except syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187928 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Unit/lit.site.cfg.in b/test/Unit/lit.site.cfg.in index 65e98d0af55..c6e12400d1b 100644 --- a/test/Unit/lit.site.cfg.in +++ b/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@" @@ -13,7 +15,8 @@ config.shlibpath_var = "@SHLIBPATH_VAR@" try: config.llvm_tools_dir = config.llvm_tools_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/test/lit.site.cfg.in b/test/lit.site.cfg.in index 1ae99eb0249..3e7dc5c6a38 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -1,3 +1,5 @@ +import sys + ## Autogenerated by LLVM/Clang configuration. # Do not edit! config.host_triple = "@LLVM_HOST_TRIPLE@" @@ -25,7 +27,8 @@ config.have_zlib = "@HAVE_LIBZ@" # used when we can't determine the tool dir at configuration time. try: config.llvm_tools_dir = config.llvm_tools_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))