From 0f5ccd4d6d63e622f4e43ca516e6f5df3f0a3150 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 23 Jan 2016 16:01:45 +1100 Subject: Generate a fatal error on a Sphinx beta version that cannot be parsed. --- common/waf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'common/waf.py') diff --git a/common/waf.py b/common/waf.py index faf7ed5..cf73ddc 100644 --- a/common/waf.py +++ b/common/waf.py @@ -51,9 +51,11 @@ class linkcheck(BuildContext): def check_sphinx_version(ctx, minver): - version = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD + ['--version']).split(" ")[-1:][0] - ver = tuple(map(int, version.split("."))) - + version = ctx.cmd_and_log(ctx.env.BIN_SPHINX_BUILD + ['--version']).split(" ")[-1:][0].strip() + try: + ver = tuple(map(int, version.split("."))) + except: + ctx.fatal("Sphinx version cannot be checked: %s" % version) if ver < minver: ctx.fatal("Sphinx version is too old: %s" % ".".join(map(str, ver))) -- cgit v1.2.3