mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use f-strings
This commit is contained in:
parent
64834d821a
commit
e3721b493b
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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"],
|
||||
|
|
Loading…
Add table
Reference in a new issue