From 4144c3937c5d6adeab9d7899197e8372e46369aa Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 15 Feb 2018 09:22:57 -0800 Subject: [PATCH] Check for a source tree doc install first, not second. This way a source install and test run will always take precedence over a system installed version. --- src/pylorax/api/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pylorax/api/server.py b/src/pylorax/api/server.py index 7a27e889..4601e1da 100644 --- a/src/pylorax/api/server.py +++ b/src/pylorax/api/server.py @@ -43,10 +43,10 @@ def hello_world(): def api_docs(path=None): # Find the html docs try: - docs_path = glob("/usr/share/doc/lorax-*/html/")[0] - except IndexError: # This assumes it is running from the source tree docs_path = os.path.abspath(joinpaths(os.path.dirname(__file__), "../../../docs/html")) + except IndexError: + docs_path = glob("/usr/share/doc/lorax-*/html/")[0] if not path: path="index.html"