Fix up the API documentation a bit, make it throw an error if it can't find the code directory, rather than blindly trying to build.

bzr-revno: 114
This commit is contained in:
Raoul Snyman 2012-11-21 23:42:35 +02:00
commit 8ad1bce9b3

View File

@ -19,6 +19,10 @@ import sys
# documentation root, use os.path.abspath to make it absolute, like shown here.
path_to_code = os.path.abspath(os.path.join(os.path.split(__file__)[0],
'..', '..', '..', '..', 'OpenLP', 'trunk'))
if not os.path.exists(path_to_code):
print 'Incorrect path to code, expecting "%s"' % path_to_code
sys.exit(1)
sys.path.insert(0, path_to_code)
# -- General configuration -----------------------------------------------------