[tests] Avoid deprecated except syntax.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 7 Aug 2013 23:09:10 +0000 (23:09 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 7 Aug 2013 23:09:10 +0000 (23:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187928 91177308-0d34-0410-b5e6-96231b3b80d8

test/Unit/lit.site.cfg.in
test/lit.site.cfg.in

index 65e98d0af550cb2e57c204b9a0a07b5bc8ad88f1..c6e12400d1be07fa94bc00ce6cc58a56ea8423a7 100644 (file)
@@ -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))
 
index 1ae99eb02496c2f175b6b46eb93c333115bcc94c..3e7dc5c6a38ad939789886366ee702628cf06de9 100644 (file)
@@ -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))