mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-27 05:58:50 +00:00
modules [no]*: use f-strings (#10973)
* modules [no]*: use f-strings * add changelog frag
This commit is contained in:
parent
50846b7560
commit
749c06cd01
44 changed files with 399 additions and 412 deletions
|
|
@ -327,7 +327,7 @@ class ImageInfoModule(OpenNebulaModule):
|
|||
break
|
||||
|
||||
if len(ids) > 0:
|
||||
self.module.fail_json(msg='There is no IMAGE(s) with id(s)=' + ', '.join('{id}'.format(id=str(image_id)) for image_id in ids))
|
||||
self.module.fail_json(msg=f"There is no IMAGE(s) with id(s)={', '.join(str(image_id) for image_id in ids)}")
|
||||
|
||||
return images
|
||||
|
||||
|
|
@ -354,7 +354,7 @@ class ImageInfoModule(OpenNebulaModule):
|
|||
|
||||
# if the specific name is indicated
|
||||
if pattern is None and len(images) == 0:
|
||||
self.module.fail_json(msg="There is no IMAGE with name=" + name_pattern)
|
||||
self.module.fail_json(msg=f"There is no IMAGE with name={name_pattern}")
|
||||
|
||||
return images
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue