r188041 - [tests] Avoid deprecated except syntax.
Daniel Dunbar
daniel at zuster.org
Thu Aug 8 17:45:00 PDT 2013
Author: ddunbar
Date: Thu Aug 8 19:44:59 2013
New Revision: 188041
URL: http://llvm.org/viewvc/llvm-project?rev=188041&view=rev
Log:
[tests] Avoid deprecated except syntax.
Modified:
cfe/trunk/test/Unit/lit.site.cfg.in
cfe/trunk/test/lit.site.cfg.in
Modified: cfe/trunk/test/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Unit/lit.site.cfg.in?rev=188041&r1=188040&r2=188041&view=diff
==============================================================================
--- cfe/trunk/test/Unit/lit.site.cfg.in (original)
+++ cfe/trunk/test/Unit/lit.site.cfg.in Thu Aug 8 19:44:59 2013
@@ -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))
Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=188041&r1=188040&r2=188041&view=diff
==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Thu Aug 8 19:44:59 2013
@@ -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_S
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))
More information about the cfe-commits
mailing list