mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 15:38:53 +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:
parent
749c06cd01
commit
d51e4c188b
22 changed files with 153 additions and 155 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue