mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
protect PluginLoader._extra_dirs from appending None
PluginLoader.add_directory() can receive None from, for example, Inventory.add_directory(self.basedir()) if host_list is a custom list. None has no reasonable interpretation other than ignore it.
This commit is contained in:
@@ -70,7 +70,8 @@ class PluginLoader(object):
|
||||
|
||||
def add_directory(self, directory):
|
||||
"""Adds an additional directory to the search path"""
|
||||
self._extra_dirs.append(directory)
|
||||
if directory is not None:
|
||||
self._extra_dirs.append(directory)
|
||||
|
||||
def print_paths(self):
|
||||
"""Returns a string suitable for printing of the search path"""
|
||||
|
||||
Reference in New Issue
Block a user