diff --git a/salt/modules/tuned.py b/salt/modules/tuned.py index 96e9da61334..0e823e45062 100644 --- a/salt/modules/tuned.py +++ b/salt/modules/tuned.py @@ -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 diff --git a/salt/states/tuned.py b/salt/states/tuned.py index ea5c4ff291e..b9956e557cc 100644 --- a/salt/states/tuned.py +++ b/salt/states/tuned.py @@ -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"],