mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-14 07:55:05 +00:00
modules bc*: use f-strings (#10945)
* modules bc*: use f-strings * no quotes or backticks inside f-strs * add changelog frag * rename chglof frag file * rename chglof frag file * copr: re-applied change maintain original logic
This commit is contained in:
parent
f9b4abf930
commit
0ef2235929
31 changed files with 197 additions and 202 deletions
|
|
@ -132,13 +132,13 @@ def main():
|
|||
except xmlrpc_client.Fault as e:
|
||||
module.fail_json(msg="Failed to log in to Cobbler '{url}' as '{username}'. {error}".format(url=url, error=to_text(e), **module.params))
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Connection to '{url}' failed. {error}".format(url=url, error=to_text(e)))
|
||||
module.fail_json(msg=f"Connection to '{url}' failed. {e}")
|
||||
|
||||
if not module.check_mode:
|
||||
try:
|
||||
conn.sync(token)
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Failed to sync Cobbler. {error}".format(error=to_text(e)))
|
||||
module.fail_json(msg=f"Failed to sync Cobbler. {e}")
|
||||
|
||||
elapsed = now() - start
|
||||
module.exit_json(elapsed=elapsed.seconds, **result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue