Skip to content

Commit

Permalink
Bugfix - EnvironmentError with wrong indentation (#5202)
Browse files Browse the repository at this point in the history
* 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

* Add changelog fragment

* Sanity Check failed before

* Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml

Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 36a7939)
  • Loading branch information
PKehnel authored and patchback[bot] committed Sep 3, 2022
1 parent e646d21 commit 32f5311
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 0 additions & 2 deletions plugins/modules/system/listen_ports_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 32f5311

Please sign in to comment.