opennebula: fix error message when renaming an image (#3626) (#3650)

While porting this module to make use of `pyone` I have overlooked one
attribute.  Luckily the error only occurs when trying to rename an image
to a name that has already been taken.

Instead of telling the user which image ID already uses that name, the
module failed with the following error (along with a huge backtrace):

    AttributeError: 'IMAGESub' object has no attribute 'id'

With this commit the error message is much more obvous again.

(cherry picked from commit b429c520f5)

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
patchback[bot] 2021-10-31 18:50:20 +01:00 committed by GitHub
commit 739719a3b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- one_image - fix error message when renaming an image (https://github.com/ansible-collections/community.general/pull/3626).