forked from ungleich-public/cdist
Fix import error when PYTHONPATH is not set.
This commit is contained in:
parent
0d82c37928
commit
1815936b7d
1 changed files with 5 additions and 2 deletions
|
@ -15,7 +15,6 @@
|
|||
|
||||
import sys
|
||||
import os
|
||||
import cdist.version
|
||||
import sphinx_rtd_theme
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
|
@ -23,7 +22,11 @@ import sphinx_rtd_theme
|
|||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)), "../../")))
|
||||
os.path.dirname(os.path.realpath(__file__)), "..", "..")))
|
||||
|
||||
# Import cdist after sys.path fixup above.
|
||||
|
||||
import cdist.version # nopep8 - ignore error that import is not at top
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue