mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-24 20:59:16 +00:00
Replace % string formatting with f-strings across multiple plugins (#11908)
* Replace % string formatting with f-strings across multiple plugins Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Add changelog fragment for PR 11908 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
253ac45dd3
commit
53397c081a
14 changed files with 65 additions and 64 deletions
|
|
@ -4122,8 +4122,10 @@ class RedfishUtils:
|
|||
|
||||
# Get Registries URI
|
||||
if "Bios" not in server_details:
|
||||
msg = "Getting BIOS URI failed, Key 'Bios' not found in /redfish/v1/Systems/1/ response: %s"
|
||||
return {"ret": False, "msg": msg % str(server_details)}
|
||||
return {
|
||||
"ret": False,
|
||||
"msg": f"Getting BIOS URI failed, Key 'Bios' not found in /redfish/v1/Systems/1/ response: {server_details}",
|
||||
}
|
||||
|
||||
bios_uri = server_details["Bios"]["@odata.id"]
|
||||
bios_resp = self.get_request(self.root_uri + bios_uri)
|
||||
|
|
@ -4169,8 +4171,10 @@ class RedfishUtils:
|
|||
if isinstance(loc["Uri"], dict) and "extref" in loc["Uri"].keys():
|
||||
rsp_uri = loc["Uri"]["extref"]
|
||||
if not rsp_uri:
|
||||
msg = "Language 'en' not found in BIOS Attribute Registries location, URI: %s, response: %s"
|
||||
return {"ret": False, "msg": msg % (resp_uri, str(resp_data))}
|
||||
return {
|
||||
"ret": False,
|
||||
"msg": f"Language 'en' not found in BIOS Attribute Registries location, URI: {resp_uri}, response: {resp_data}",
|
||||
}
|
||||
|
||||
res = self.get_request(self.root_uri + rsp_uri)
|
||||
if res["ret"] is False:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue