1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-30 07:28:52 +00:00

modules r*: use f-strings (#10975)

* modules r*: use f-strings

* add changelog frag

* Apply suggestions from code review
This commit is contained in:
Alexei Znamensky 2025-10-26 19:48:33 +13:00 committed by GitHub
parent 749c06cd01
commit d51e4c188b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 153 additions and 155 deletions

View file

@ -127,7 +127,7 @@ def main():
while True:
if time.time() > timeout:
module.fail_json(msg='Timeout, could not fetch Riak stats.')
(response, info) = fetch_url(module, 'http://%s/stats' % (http_conn), force=True, timeout=5)
(response, info) = fetch_url(module, f'http://{http_conn}/stats', force=True, timeout=5)
if info['status'] == 200:
stats_raw = response.read()
break
@ -211,7 +211,7 @@ def main():
module.fail_json(msg='Timeout waiting for handoffs.')
if wait_for_service:
cmd = riak_admin_bin + ['wait_for_service', 'riak_%s' % wait_for_service, node_name]
cmd = riak_admin_bin + ['wait_for_service', f'riak_{wait_for_service}', node_name]
rc, out, err = module.run_command(cmd)
result['service'] = out