From bccf6b85f2f009c91a5e6e2a9564c5a233518317 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 18 Jun 2020 10:54:47 -0700 Subject: [PATCH] Change comprehension to `list()` in plugin loader. --- changelogs/fragments/plugin-loader-cleanup.yml | 2 ++ lib/ansible/plugins/loader.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/plugin-loader-cleanup.yml diff --git a/changelogs/fragments/plugin-loader-cleanup.yml b/changelogs/fragments/plugin-loader-cleanup.yml new file mode 100644 index 00000000000..9fca422e23e --- /dev/null +++ b/changelogs/fragments/plugin-loader-cleanup.yml @@ -0,0 +1,2 @@ +minor_changes: + - Minor code cleanup in plugin loader. diff --git a/lib/ansible/plugins/loader.py b/lib/ansible/plugins/loader.py index 249aebd7dd3..49b85e57ace 100644 --- a/lib/ansible/plugins/loader.py +++ b/lib/ansible/plugins/loader.py @@ -981,7 +981,7 @@ class Jinja2Loader(PluginLoader): # We have to instantiate a list of all plugins so that we can reverse it. We reverse it so # that calling code will deduplicate this correctly. - plugins = [p for p in super(Jinja2Loader, self).all(*args, **kwargs)] + plugins = list(super(Jinja2Loader, self).all(*args, **kwargs)) plugins.reverse() return plugins