mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
modules [jk]*: use f-strings (#10970)
* modules [jk]*: use f-strings * add changelog frag * Apply suggestions from code review * typing insanity
This commit is contained in:
@@ -212,7 +212,7 @@ def run_module(module, tmpdir, kwriteconfig):
|
||||
try:
|
||||
module.atomic_move(b_tmpfile, os.path.abspath(b_path))
|
||||
except IOError:
|
||||
module.ansible.fail_json(msg='Unable to move temporary file %s to %s, IOError' % (tmpfile, result['path']), traceback=traceback.format_exc())
|
||||
module.ansible.fail_json(msg=f"Unable to move temporary file {tmpfile} to {result['path']}, IOError", traceback=traceback.format_exc())
|
||||
|
||||
if result['changed']:
|
||||
module.set_fs_attributes_if_different(file_args, result['changed'])
|
||||
|
||||
Reference in New Issue
Block a user