1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-27 07:27:33 +00:00

modules s[f-z]*: use f-strings (#10977)

* modules s[f-z]*: use f-strings

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-26 22:35:30 +13:00 committed by GitHub
parent 73452acf84
commit af246f8de3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 274 additions and 273 deletions

View file

@ -106,7 +106,7 @@ def syspatch_run(module):
rc, out, err = module.run_command([cmd] + check_flag)
if rc != 0:
module.fail_json(msg="Command %s failed rc=%d, out=%s, err=%s" % (cmd, rc, out, err))
module.fail_json(msg=f"Command {cmd} failed rc={rc}, out={out}, err={err}")
if len(out) > 0:
# Changes pending
@ -123,7 +123,7 @@ def syspatch_run(module):
# Workaround syspatch ln bug:
# http://openbsd-archive.7691.n7.nabble.com/Warning-applying-latest-syspatch-td354250.html
if rc != 0 and err != 'ln: /usr/X11R6/bin/X: No such file or directory\n':
module.fail_json(msg="Command %s failed rc=%d, out=%s, err=%s" % (cmd, rc, out, err))
module.fail_json(msg=f"Command {cmd} failed rc={rc}, out={out}, err={err}")
elif out.lower().find('create unique kernel') >= 0:
# Kernel update applied
reboot_needed = True