Skip to content

Commit

Permalink
Use f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
leeclemens committed Dec 19, 2023
1 parent 3441439 commit c43f745
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion salt/modules/tuned.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions salt/states/tuned.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"],
Expand Down

0 comments on commit c43f745

Please sign in to comment.