[rtems-docs commit] Fix error messages when Sphinx version cannot be checked.

Amar Takhar amar at rtems.org
Wed Dec 5 19:35:00 UTC 2018


Module:    rtems-docs
Branch:    master
Commit:    a46b0250e58fb8aa9032971997cc1eff8fd0dcc8
Changeset: http://git.rtems.org/rtems-docs/commit/?id=a46b0250e58fb8aa9032971997cc1eff8fd0dcc8

Author:    Amar Takhar <verm at darkbeer.org>
Date:      Wed Dec  5 14:31:53 2018 -0500

Fix error messages when Sphinx version cannot be checked.

This is kind of a dual-check since it checks for the version while simultaneously
checking to see if Sphinx exists on the system.

Changed the error messages to be clear on the error and removed a reference to
version which cannot be set due to the check failure.

Reported by: Shashvat Jain

---

 common/waf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/waf.py b/common/waf.py
index 692d4de..98ce56f 100644
--- a/common/waf.py
+++ b/common/waf.py
@@ -119,9 +119,9 @@ def check_sphinx_version(ctx, minver):
                 try:
                     ver = tuple(map(int, re.split('[\D]', version)))
                 except:
-                    ctx.fatal("Sphinx version cannot be checked")
+                    ctx.fatal("Sphinx version cannot be checked or Sphinx is not installed")
             except:
-                ctx.fatal("Sphinx version cannot be checked: %s" % version)
+                ctx.fatal("Sphinx version cannot be checked or Sphinx is not installed")
     if ver < minver:
         ctx.fatal("Sphinx version is too old: %s" % ".".join(map(str, ver)))
     return ver




More information about the vc mailing list