-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Bugfix - EnvironmentError with wrong indentation #5202
Bugfix - EnvironmentError with wrong indentation #5202
Conversation
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
Thanks for your contribution! Can you please add a changelog fragment? Thanks. |
This comment was marked as outdated.
This comment was marked as outdated.
changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml
Outdated
Show resolved
Hide resolved
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #5221 🤖 @patchback |
@PKehnel thanks for fixing this! |
* 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)
* 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) Co-authored-by: PKehnel <ga65coy@mytum.de>
…#5202) * 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>
SUMMARY
Fixes #4953
As part of the above merge request a minor bug was introduced.
else
statement was one too far.else
statement is now handled in the function:split_pid_name
ISSUE TYPE
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 checkif 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.