Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #5202/36a79399 backport][stable-5] Bugfix - EnvironmentError with wrong indentation #5221

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Sep 3, 2022

This is a backport of PR #5202 as merged into main (36a7939).

SUMMARY

Fixes #4953
As part of the above merge request a minor bug was introduced.

  • The indentation of an else statement was one too far.
  • The purpose of the else statement is now handled in the function: split_pid_name
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

listen port facts

ADDITIONAL INFORMATION

The else statement:EnvironmentError('Could not get process information for the listening ports.') can be removed. The purpose was to check if conns and pids exists and else throw the error.

See previous usage line in older version 173 / 194: https://github.com/ansible-collections/community.general/blob/6a7811f6963ad1f5f92342b786e70a809e1c9e08/plugins/modules/system/listen_ports_facts.py

This is now handled in the split_pid_name function.

* 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)
@felixfontein felixfontein merged commit ea2df93 into stable-5 Sep 3, 2022
@felixfontein felixfontein deleted the patchback/backports/stable-5/36a7939962cffd3abc6c0725ef66bf7d865f7683/pr-5202 branch September 3, 2022 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants