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.
This commit is contained in:
Brian C. Lane 2018-02-15 09:22:57 -08:00
parent 91cebe7b67
commit 4144c3937c

View File

@ -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"