From efa6197ab76e151a3ec253dcd9dbd716f60a92c8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Sat, 13 Dec 2014 02:46:56 +0000 Subject: [PATCH] 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. llvm-svn: 224181 --- compiler-rt/test/lit.common.configured.in | 2 +- compiler-rt/unittests/lit.common.unit.configured.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in index beecaa25886a..ceab67d4ad07 100644 --- a/compiler-rt/test/lit.common.configured.in +++ b/compiler-rt/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/compiler-rt/unittests/lit.common.unit.configured.in b/compiler-rt/unittests/lit.common.unit.configured.in index ab5c253c7d1c..18adf6482a58 100644 --- a/compiler-rt/unittests/lit.common.unit.configured.in +++ b/compiler-rt/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))