diff --git a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml new file mode 100644 index 00000000000..d9001169b0a --- /dev/null +++ b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml @@ -0,0 +1,2 @@ +bugfixes: + - listen_ports_facts - removed leftover ``EnvironmentError`` . The ``else`` clause had a wrong indentation. The check is now handled in the ``split_pid_name`` function (https://github.com//pull/5202). \ No newline at end of file diff --git a/plugins/modules/system/listen_ports_facts.py b/plugins/modules/system/listen_ports_facts.py index c137a33e427..fc4afa6d7bd 100644 --- a/plugins/modules/system/listen_ports_facts.py +++ b/plugins/modules/system/listen_ports_facts.py @@ -257,8 +257,6 @@ def netStatParse(raw): } if result not in results: results.append(result) - else: - raise EnvironmentError('Could not get process information for the listening ports.') return results