1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-25 13:12:46 +00:00

modules s[f-z]*: use f-strings (#10977)

* modules s[f-z]*: use f-strings

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-26 22:35:30 +13:00 committed by GitHub
parent 73452acf84
commit af246f8de3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 274 additions and 273 deletions

View file

@ -895,7 +895,7 @@ def handle_elastigroup(client, module):
if should_create is True:
if state == 'present':
eg = expand_elastigroup(module, is_update=False)
module.debug(str(" [INFO] " + message + "\n"))
module.debug(f" [INFO] {message}\n")
group = client.create_elastigroup(group=eg)
group_id = group['id']
message = 'Created group Successfully.'
@ -923,7 +923,7 @@ def handle_elastigroup(client, module):
message = 'Updated and started rolling the group successfully.'
except SpotinstClientException as exc:
message = 'Updated group successfully, but failed to perform roll. Error:' + str(exc)
message = f"Updated group successfully, but failed to perform roll. Error:{exc}"
has_changed = True
elif state == 'absent':
@ -933,7 +933,7 @@ def handle_elastigroup(client, module):
if "GROUP_DOESNT_EXIST" in exc.message:
pass
else:
module.fail_json(msg="Error while attempting to delete group : " + exc.message)
module.fail_json(msg=f"Error while attempting to delete group : {exc.message}")
message = 'Deleted group successfully.'
has_changed = True