From a4ac1ea1939da65b4df2892b4f6c9a7943aa2332 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 27 Jul 2020 11:12:38 -0500 Subject: [PATCH] Fix docs builds for modern stevedors We have a custom doc build extension that scans module names, but the api for that changed. Change-Id: If8c08d22dde3e570cdc6fb7092bc131e2e3bcc18 --- doc/ext/list_plugins.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/ext/list_plugins.py b/doc/ext/list_plugins.py index 8d4dcd03..0998084a 100644 --- a/doc/ext/list_plugins.py +++ b/doc/ext/list_plugins.py @@ -76,7 +76,15 @@ class ListAuthPluginsDirective(rst.Directive): for name in sorted(mgr.names()): for line in self.display_plugin(mgr[name]): for l in line.splitlines(): - result.append(l, mgr[name].entry_point.module_name) + ep = mgr[name] + try: + module_name = ep.entry_point.module_name + except AttributeError: + try: + module_name = ep.entry_point.module + except AttributeError: + module_name = ep.entry_point.value + result.append(l, module_name) # Parse what we have into a new section. node = nodes.section()