jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
doc/conf.py: Use the parent of the current file, not the parent of cwd

'..' refers to the parent of current working directory. It may not work as
expected if the cwd is not `docs`.

Not sure, but this could be the cause of T185082.

Bug: T185082
Change-Id: I92dda3cc4f85215e1644ae473d0cd1853b6a26e9
---
M docs/conf.py
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/conf.py b/docs/conf.py
index 85380aa..41be174 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,12 +18,14 @@
from __future__ import absolute_import, unicode_literals

import os
+from os.path import abspath, dirname, join
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('..'))
+repo_dir = abspath(join(dirname(__file__), '..'))
+sys.path.insert(0, repo_dir)

# -- General configuration -----------------------------------------------------

To view, visit change 409574. To unsubscribe, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I92dda3cc4f85215e1644ae473d0cd1853b6a26e9
Gerrit-Change-Number: 409574
Gerrit-PatchSet: 2
Gerrit-Owner: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot <>