[llvm] r187928 - [tests] Avoid deprecated except syntax.
Daniel Dunbar
daniel at zuster.org
Wed Aug 7 16:09:10 PDT 2013
Author: ddunbar
Date: Wed Aug 7 18:09:10 2013
New Revision: 187928
URL: http://llvm.org/viewvc/llvm-project?rev=187928&view=rev
Log:
[tests] Avoid deprecated except syntax.
Modified:
llvm/trunk/test/Unit/lit.site.cfg.in
llvm/trunk/test/lit.site.cfg.in
Modified: llvm/trunk/test/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Unit/lit.site.cfg.in?rev=187928&r1=187927&r2=187928&view=diff
==============================================================================
--- llvm/trunk/test/Unit/lit.site.cfg.in (original)
+++ llvm/trunk/test/Unit/lit.site.cfg.in Wed Aug 7 18:09:10 2013
@@ -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))
Modified: llvm/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.site.cfg.in?rev=187928&r1=187927&r2=187928&view=diff
==============================================================================
--- llvm/trunk/test/lit.site.cfg.in (original)
+++ llvm/trunk/test/lit.site.cfg.in Wed Aug 7 18:09:10 2013
@@ -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))
More information about the llvm-commits
mailing list