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

one_vm: fix for 'NoneType' object has no attribute 'split' in get_vm_labels_and_attributes_dict #5489

Merged
merged 4 commits into from
Nov 8, 2022

Conversation

d34d5p4rr0w
Copy link
Contributor

SUMMARY

Got a bug with NoneTypee when parsing VM's list, create small fix for this
'NoneType' object has no attribute 'split'

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

community.general.one_vm.py

ADDITIONAL INFORMATION

VM without labels and caused an exception in function
get_vm_labels_and_attributes_dict
AttributeError: 'NoneType' object has no attribute 'split'

File \"/tmp/ansible_community.general.one_vm_payload_ko5loyc4/ansible_community.general.one_vm_payload.zip/ansible_collections/community/general/plugins/modules/cloud/opennebula/one_vm.py\", line 993, in get_vm_labels_and_attributes_dict\nAttributeError: 'NoneType' object has no attribute 'split'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

After fix everything is fine

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug cloud module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels Nov 7, 2022
@felixfontein felixfontein changed the title Fix for 'NoneType' object has no attribute 'split' in get_vm_labels_and_attributes_dict one_vm: fix for 'NoneType' object has no attribute 'split' in get_vm_labels_and_attributes_dict Nov 7, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Can you please add a changelog fragment? Thanks!

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Nov 7, 2022
@d34d5p4rr0w
Copy link
Contributor Author

Thanks for your contribution! Can you please add a changelog fragment? Thanks!

Added changelog

@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed small_patch Hopefully easy to review labels Nov 8, 2022
@felixfontein
Copy link
Collaborator

Can you fix the line endings in the changelog fragment (Windows style → Unix style)?

@d34d5p4rr0w
Copy link
Contributor Author

d34d5p4rr0w commented Nov 8, 2022

Can you fix the line endings in the changelog fragment (Windows style → Unix style)?

Okay, made it

@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Nov 8, 2022
@felixfontein felixfontein merged commit 621fb6a into ansible-collections:main Nov 8, 2022
@patchback
Copy link

patchback bot commented Nov 8, 2022

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/621fb6a619fce1d45a72dc2b46bdbc3fb64d86d5/pr-5489

Backported as #5512

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Nov 8, 2022
patchback bot pushed a commit that referenced this pull request Nov 8, 2022
…labels_and_attributes_dict (#5489)

* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

Co-authored-by: Felix Fontein <[email protected]>

* Fix line ending in changelog

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 621fb6a)
@patchback
Copy link

patchback bot commented Nov 8, 2022

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/621fb6a619fce1d45a72dc2b46bdbc3fb64d86d5/pr-5489

Backported as #5513

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@d34d5p4rr0w thanks for fixing this!

patchback bot pushed a commit that referenced this pull request Nov 8, 2022
…labels_and_attributes_dict (#5489)

* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

Co-authored-by: Felix Fontein <[email protected]>

* Fix line ending in changelog

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 621fb6a)
felixfontein pushed a commit that referenced this pull request Nov 9, 2022
…labels_and_attributes_dict (#5489) (#5513)

* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

Co-authored-by: Felix Fontein <[email protected]>

* Fix line ending in changelog

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 621fb6a)

Co-authored-by: wh1t3 r4bb1t <[email protected]>
felixfontein pushed a commit that referenced this pull request Nov 9, 2022
…labels_and_attributes_dict (#5489) (#5512)

* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

Co-authored-by: Felix Fontein <[email protected]>

* Fix line ending in changelog

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 621fb6a)

Co-authored-by: wh1t3 r4bb1t <[email protected]>
russoz pushed a commit to russoz-ansible/community.general that referenced this pull request Nov 10, 2022
…labels_and_attributes_dict (ansible-collections#5489)

* Fix for 'NoneType' object has no attribute 'split'

* Added changelog to fix

* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml

Co-authored-by: Felix Fontein <[email protected]>

* Fix line ending in changelog

Co-authored-by: Felix Fontein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug cloud module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants