Ensure valid_plugin_bin is defined

Fixes #31824
This commit is contained in:
Sam Doran 2017-10-17 13:12:46 -04:00 committed by Toshio Kuratomi
parent 7fe6a8dab7
commit 2c8382eb87

View file

@ -196,10 +196,10 @@ def remove_plugin(module, plugin_bin, plugin_name):
return True, cmd, out, err
def get_plugin_bin(module, plugin_bin):
def get_plugin_bin(module, plugin_bin=None):
# Use the plugin_bin that was supplied first before trying other options
if plugin_bin:
if os.path.isfile(plugin_bin):
valid_plugin_bin = None
if plugin_bin and os.path.isfile(plugin_bin):
valid_plugin_bin = plugin_bin
else: