[Piglit] [PATCH] cmake: Require Mako >= 0.7
Chad Versace
chad.versace at intel.com
Thu Jun 26 17:52:53 PDT 2014
On Wed, Jun 25, 2014 at 10:24:42PM -0700, Dylan Baker wrote:
>
> On Wednesday, June 25, 2014 08:47:24 PM Chad Versace wrote:
> > +set(__MAKO_CHECK_VERSION_PY "
> > +try:
> > + import mako
> > +except ImportError as err:
> > + import sys
> > + sys.exit(err)
>
> I'm pretty sure that this isn't going to do what you want. sys.exit() takes an
> interger argument as an exit code, but I'm pretty sure that in this case err
> is going to be a string 'no module named mako'
Me and Dyland talked about this in person. If x is not an int, and you
call sys.exit(x), then Python prints repr(x) to stderr and then calls
sys.exit(1).
More information about the Piglit
mailing list