]> git.puffer.fish Git - matthieu/frr.git/commitdiff
doc: Create html_context before setting READTHEDOCS
authorDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 30 Oct 2024 12:15:36 +0000 (14:15 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 30 Oct 2024 18:14:56 +0000 (18:14 +0000)
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 529, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/checkouts/latest/doc/user/conf.py", line 77, in <module>
    html_context["READTHEDOCS"] = True
    ^^^^^^^^^^^^
NameError: name 'html_context' is not defined

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit ef9f698e04211281c803a67f3480835f62aae3ee)

doc/developer/conf.py
doc/user/conf.py

index 634f4aa80420e13389a622296803172c4f9c032c..a5b514814080af4646dab4303cc267d563f3e23b 100644 (file)
@@ -71,6 +71,7 @@ release = "?.?-?"
 html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
 
 # Tell Jinja2 templates the build is running on Read the Docs
+html_context = {}
 if os.environ.get("READTHEDOCS", "") == "True":
     html_context["READTHEDOCS"] = True
 
index 236a90e9026bcc1f88e826c839228e54cff707a7..f9f178f5ff1cd508f3f8c219e14bfd3314172049 100644 (file)
@@ -73,11 +73,11 @@ release = "?.?-?"
 html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
 
 # Tell Jinja2 templates the build is running on Read the Docs
+html_context = {}
 if os.environ.get("READTHEDOCS", "") == "True":
     html_context["READTHEDOCS"] = True
 
 
-
 # -----------------------------------------------------------------------------
 # Extract values from codebase for substitution into docs.
 # -----------------------------------------------------------------------------