mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Ensure sphinx doc attributes are available before trying to access them (#3156)
Very old versions of sphinx (e.g. as shipped in Ubuntu 20.04 LTS) might not have them. Close #3155
This commit is contained in:
+6
-4
@@ -289,13 +289,15 @@ def env_get_outdated(app, env, added, changed, removed):
|
||||
Remove the items listed in `docs_to_remove` from known pages.
|
||||
"""
|
||||
to_remove = set()
|
||||
for doc in env.found_docs:
|
||||
if _to_be_removed(doc):
|
||||
to_remove.add(doc)
|
||||
if hasattr(env, 'found_docs'):
|
||||
for doc in env.found_docs:
|
||||
if _to_be_removed(doc):
|
||||
to_remove.add(doc)
|
||||
added.difference_update(to_remove)
|
||||
changed.difference_update(to_remove)
|
||||
removed.update(to_remove)
|
||||
env.project.docnames.difference_update(to_remove)
|
||||
if hasattr(env, 'project'):
|
||||
env.project.docnames.difference_update(to_remove)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user