mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user