Fix missing versioned notification examples
Python 3 is used in executing 'tox -e docs' by default currently. When Python 3 is used, there are some missing notification examples. In python 3, map function returns an iterator instead of a list, and importlib.import_module is not executed in the document generation. So it causes missing versioned notification examples in the nova docs. This patch fixes it. Change-Id: Ie4f3f9be0ca7f94ce00a14f3d825a067a807eb12 Closes-Bug: #1779606
This commit is contained in:
parent
4ea64cad3f
commit
54d3e7096c
@ -56,9 +56,9 @@ jQuery(document).ready(function(){
|
||||
return self._build_markup(notifications)
|
||||
|
||||
def _import_all_notification_packages(self):
|
||||
map(lambda module: importlib.import_module(module),
|
||||
list(map(lambda module: importlib.import_module(module),
|
||||
('nova.notifications.objects.' + name for _, name, _ in
|
||||
pkgutil.iter_modules(nova.notifications.objects.__path__)))
|
||||
pkgutil.iter_modules(nova.notifications.objects.__path__))))
|
||||
|
||||
def _collect_notifications(self):
|
||||
self._import_all_notification_packages()
|
||||
|
Loading…
Reference in New Issue
Block a user