[clang-tools-extra] r198204 - Make lit.site.cfg Py3-compatible. Copied from r188041.

Nico Weber thakis at chromium.org
Mon Dec 30 16:43:28 PST 2013


On Mon, Dec 30, 2013 at 6:09 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:

> On Mon, Dec 30, 2013 at 7:18 AM, NAKAMURA Takumi <geek4civic at gmail.com>
> wrote:
> > Author: chapuni
> > Date: Mon Dec 30 00:18:08 2013
> > New Revision: 198204
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=198204&view=rev
> > Log:
> > Make lit.site.cfg Py3-compatible. Copied from r188041.
> >
> > Modified:
> >     clang-tools-extra/trunk/test/lit.site.cfg.in
> >
> > Modified: clang-tools-extra/trunk/test/lit.site.cfg.in
> > URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.site.cfg.in?rev=198204&r1=198203&r2=198204&view=diff
> >
> ==============================================================================
> > --- clang-tools-extra/trunk/test/lit.site.cfg.in (original)
> > +++ clang-tools-extra/trunk/test/lit.site.cfg.in Mon Dec 30 00:18:08
> 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.have_libedit = "@HAVE_LIBEDIT@"
> >  try:
> >      config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
> >      config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
> > -except KeyError,e:
> > +except KeyError:
> > +    e = sys.exc_info()[1]
>
> What's the range of supported Python versions? Python 2.6 and later
> supports 'as' instead of ',':
>
>   try:
>     ...
>   except KeyError as e:
>     ...
>
> It's cleaner than unpacking exception info from sys.exc_info.
>

alp landed a change containing the "as" keyword and it broke a few of the
buildbots. So it sounds at least some of the bots use a Python older than
2.6 at the moment.


>
> FWIW,
> - Kim
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131230/37e81df9/attachment.html>


More information about the cfe-commits mailing list