mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-09-30 21:43:22 -07:00
listen_ports_facts: Avoid crash when required commands are missing (#10458)
* Fix listen-port-facts crash * Update changelog * Update tests/integration/targets/listen_ports_facts/tasks/main.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Fix sanity tests * Update changelogs/fragments/10458-listen_port_facts-prevent-type-error.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
cc13f42be4
commit
fe59c6d29e
3 changed files with 32 additions and 1 deletions
|
@ -397,7 +397,7 @@ def main():
|
|||
break
|
||||
|
||||
if bin_path is None:
|
||||
raise EnvironmentError(msg='Unable to find any of the supported commands in PATH: {0}'.format(", ".join(sorted(commands_map))))
|
||||
raise EnvironmentError('Unable to find any of the supported commands in PATH: {0}'.format(", ".join(sorted(commands_map))))
|
||||
|
||||
# which ports are listening for connections?
|
||||
args = commands_map[command]['args']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue