aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-04-08 12:08:08 -0400
committerJack Lloyd <[email protected]>2020-04-08 12:08:08 -0400
commit7589b26079619fd9938b186c58690b6912d53874 (patch)
treebc487431a86aca5b79bba5c0bdaa5387d63ffa30
parent773ccb0d11f5264b6cfe209115d9e80ca26fe861 (diff)
If regex doesn't match, default to disabling use of -j
-rwxr-xr-xsrc/scripts/build_docs.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/scripts/build_docs.py b/src/scripts/build_docs.py
index 958c272d2..1eb523e50 100755
--- a/src/scripts/build_docs.py
+++ b/src/scripts/build_docs.py
@@ -134,11 +134,18 @@ def sphinx_supports_concurrency():
output, _ = proc.communicate()
if isinstance(output, bytes):
output = output.decode('ascii')
+ output = output.strip()
+
# Sphinx v1.1.3
# sphinx-build 1.7.4
match = re.match(r'^(?:[a-zA-Z_-]+) v?(([0-9]+)\.([0-9]+))', output)
- # default to using concurrency when uncertain
- version = StrictVersion(match.group(1)) if match else StrictVersion('1.2')
+
+ if match is None:
+ # If regex doesn't match, disable by default
+ logging.warning("Did not recognize sphinx version from '%s'", output)
+ return False
+
+ version = StrictVersion(match.group(1))
if version < StrictVersion('1.4'):
# not supported