mirror of
https://git.rtems.org/rtems-docs/
synced 2025-07-22 05:47:16 +08:00
Generate a fatal error on a Sphinx beta version that cannot be parsed.
This commit is contained in:
parent
e5afcaa038
commit
0f5ccd4d6d
@ -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)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user