mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
modules [t-z]*: use f-strings (#10978)
* modules [t-z]*: use f-strings * add changelog frag * remove extraneous file
This commit is contained in:
parent
af246f8de3
commit
adcc683da7
45 changed files with 514 additions and 536 deletions
|
|
@ -110,8 +110,8 @@ class YumVersionLock:
|
|||
if rc == 0:
|
||||
return out
|
||||
elif rc == 1 and 'o such command:' in err:
|
||||
self.module.fail_json(msg="Error: Please install rpm package yum-plugin-versionlock : " + to_native(err) + to_native(out))
|
||||
self.module.fail_json(msg="Error: " + to_native(err) + to_native(out))
|
||||
self.module.fail_json(msg=f"Error: Please install rpm package yum-plugin-versionlock : {to_native(err)}{to_native(out)}")
|
||||
self.module.fail_json(msg=f"Error: {to_native(err)}{to_native(out)}")
|
||||
|
||||
def ensure_state(self, packages, command):
|
||||
""" Ensure packages state """
|
||||
|
|
@ -121,7 +121,7 @@ class YumVersionLock:
|
|||
self.module.fail_json(msg=out)
|
||||
if rc == 0:
|
||||
return True
|
||||
self.module.fail_json(msg="Error: " + to_native(err) + to_native(out))
|
||||
self.module.fail_json(msg=f"Error: {to_native(err)}{to_native(out)}")
|
||||
|
||||
|
||||
def match(entry, name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue