mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
modules r*: use f-strings (#10975)
* modules r*: use f-strings * add changelog frag * Apply suggestions from code review
This commit is contained in:
@@ -472,7 +472,7 @@ def main():
|
||||
manager = module.params['manager']
|
||||
|
||||
# Build root URI
|
||||
root_uri = "https://" + module.params['baseuri']
|
||||
root_uri = f"https://{module.params['baseuri']}"
|
||||
rf_utils = RedfishUtils(creds, root_uri, timeout, module)
|
||||
|
||||
# Build Category list
|
||||
@@ -500,10 +500,10 @@ def main():
|
||||
for cmd in command_list:
|
||||
# Fail if even one command given is invalid
|
||||
if cmd not in CATEGORY_COMMANDS_ALL[category]:
|
||||
module.fail_json(msg="Invalid Command: %s" % cmd)
|
||||
module.fail_json(msg=f"Invalid Command: {cmd}")
|
||||
else:
|
||||
# Fail if even one category given is invalid
|
||||
module.fail_json(msg="Invalid Category: %s" % category)
|
||||
module.fail_json(msg=f"Invalid Category: {category}")
|
||||
|
||||
# Organize by Categories / Commands
|
||||
if category == "Service":
|
||||
|
||||
Reference in New Issue
Block a user