From 6c9250b2585f624cc9ee3dae55554757a934b066 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 27 May 2020 11:11:48 +0100 Subject: [PATCH] Ignore 'last_updated' for auto-generated pages We (nova) see the following warnings in our documentation builds: [openstackdocstheme] could not determine last_updated for 'genindex' [openstackdocstheme] could not determine last_updated for 'search' This makes sense, since these pages are automatically generated by Sphinx. Filter out warnings to remove these. Change-Id: Ic85bc4356bc5bf0f5bf5771d4e81bb2be72f6ff7 Signed-off-by: Stephen Finucane --- openstackdocstheme/page_context.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openstackdocstheme/page_context.py b/openstackdocstheme/page_context.py index 476a2810..7a6e8a6d 100644 --- a/openstackdocstheme/page_context.py +++ b/openstackdocstheme/page_context.py @@ -84,9 +84,13 @@ def _get_last_updated(app, pagename): '[openstackdocstheme] Last updated for %s is %s', pagename, last_updated) return last_updated - LOG.info( - '[openstackdocstheme] could not determine last_updated for %r', - pagename) + + if pagename not in ('genindex', 'search'): + LOG.info( + '[openstackdocstheme] could not determine last_updated for %r', + pagename, + ) + return _default_last_updated