From 1d48750f4c1e678772095a02b833089f5c743954 Mon Sep 17 00:00:00 2001 From: Paul-Kehnel Date: Wed, 31 Aug 2022 09:23:58 +0200 Subject: [PATCH 1/4] The EnvironmentError is now handled in the splid_pid_name function. The error also had a wrong indentation. See previous setup with correct setup: https://github.com/ansible-collections/community.general/blob/6a7811f6963ad1f5f92342b786e70a809e1c9e08/plugins/modules/system/listen_ports_facts.py --- plugins/modules/system/listen_ports_facts.py | 2 -- 1 file changed, 2 deletions(-) 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 From 41cf23fc065c2b619f0e9e7a3504769fa088be3a Mon Sep 17 00:00:00 2001 From: Paul-Kehnel Date: Thu, 1 Sep 2022 08:23:53 +0200 Subject: [PATCH 2/4] Add changelog fragment --- .../5202-bugfix-environmentError-wrong-indentation.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml 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..62deb9c141c --- /dev/null +++ b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml @@ -0,0 +1,2 @@ +bugfixes: + - Removed leftover ``EnvironmentError``. The ``else clause`` had a wrong indentation. The check is now handled in the ``split_pid_name``function. https://github.com/ansible-collections/community.general/pull/5202 \ No newline at end of file From ab1861bcdda4aae9165e494dd56f393f8c2101a4 Mon Sep 17 00:00:00 2001 From: Paul-Kehnel Date: Thu, 1 Sep 2022 08:35:23 +0200 Subject: [PATCH 3/4] Sanity Check failed before --- .../5202-bugfix-environmentError-wrong-indentation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml index 62deb9c141c..fe22d63d604 100644 --- a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml +++ b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml @@ -1,2 +1,2 @@ bugfixes: - - Removed leftover ``EnvironmentError``. The ``else clause`` had a wrong indentation. The check is now handled in the ``split_pid_name``function. https://github.com/ansible-collections/community.general/pull/5202 \ No newline at end of file + - removed leftover ``EnvironmentError`` . The ``else clause`` had a wrong indentation. The check is now handled in the ``split_pid_name`` function. https://github.com/ansible-collections/community.general/pull/5202 \ No newline at end of file From d48bec53e227b7a40894796df393e943b22ae43c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 3 Sep 2022 11:51:08 +0200 Subject: [PATCH 4/4] Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml --- .../5202-bugfix-environmentError-wrong-indentation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml index fe22d63d604..d9001169b0a 100644 --- a/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml +++ b/changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml @@ -1,2 +1,2 @@ bugfixes: - - removed leftover ``EnvironmentError`` . The ``else clause`` had a wrong indentation. The check is now handled in the ``split_pid_name`` function. https://github.com/ansible-collections/community.general/pull/5202 \ No newline at end of file + - 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