mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +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:
parent
73452acf84
commit
af246f8de3
29 changed files with 274 additions and 273 deletions
|
|
@ -120,7 +120,6 @@ import syslog
|
|||
import traceback
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
def get_facility(facility):
|
||||
|
|
@ -202,7 +201,7 @@ def main():
|
|||
result['changed'] = True
|
||||
|
||||
except Exception as exc:
|
||||
module.fail_json(error='Failed to write to syslog %s' % to_native(exc), exception=traceback.format_exc(), **result)
|
||||
module.fail_json(error=f'Failed to write to syslog {exc}', exception=traceback.format_exc(), **result)
|
||||
|
||||
module.exit_json(**result)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue