summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-12-13 02:46:56 +0000
committerJustin Bogner <mail@justinbogner.com>2014-12-13 02:46:56 +0000
commit52d55c036292aac56ead80be5c3d4e024701cb0b (patch)
tree8b7484c7581383d2e78939ffbaefa7b1d4ef7be4
parent615a96827869f87d4e163d2c3e6786ca5cdb18ff (diff)
Use the newer python syntax for exceptions
We've dropped support for python 2.5, so now we can use the forward compatible "except ... as" syntax. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224181 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lit.common.configured.in2
-rw-r--r--unittests/lit.common.unit.configured.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/lit.common.configured.in b/test/lit.common.configured.in
index beecaa258..ceab67d4a 100644
--- a/test/lit.common.configured.in
+++ b/test/lit.common.configured.in
@@ -30,7 +30,7 @@ set_default("emulator", "@COMPILER_RT_EMULATOR@")
# apply substitution.
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
-except KeyError,e:
+except KeyError as e:
key, = e.args
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
diff --git a/unittests/lit.common.unit.configured.in b/unittests/lit.common.unit.configured.in
index ab5c253c7..18adf6482 100644
--- a/unittests/lit.common.unit.configured.in
+++ b/unittests/lit.common.unit.configured.in
@@ -17,7 +17,7 @@ config.host_os = "@HOST_OS@"
try:
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError,e:
+except KeyError as e:
key, = e.args
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))