Use f-strings

This commit is contained in:
Lee Clemens 2023-12-19 13:40:51 -05:00 committed by Daniel Wozniak
parent 64834d821a
commit e3721b493b
2 changed files with 3 additions and 3 deletions

View file

@ -113,7 +113,7 @@ def profile(profile_name):
# run tuned-adm with the profile specified, upon success replace stdout with the profile_name
result = __salt__["cmd.run_all"](
"tuned-adm profile {}".format(profile_name), ignore_retcode=True
f"tuned-adm profile {profile_name}", ignore_retcode=True
)
if result["retcode"] == 0:
result["stdout"] = profile_name

View file

@ -64,7 +64,7 @@ def profile(name):
)
ret["changes"] = {
"old": current_state_dict["stdout"],
"new": "Profile will be set to {}".format(profile),
"new": f"Profile will be set to {profile}",
}
# return None when testing
ret["result"] = None
@ -78,7 +78,7 @@ def profile(name):
ret["comment"] = new_state_dict["stderr"]
else:
# create the comment data structure
ret["comment"] = 'Tunings changed to "{}"'.format(profile)
ret["comment"] = f'Tunings changed to "{profile}"'
# add the changes specifics
ret["changes"] = {
"old": current_state_dict["stdout"],