mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-26 13:56:09 -07:00
modules a*: use f-strings (#10942)
* modules a*: use f-strings * add changelog frag * add changelog frag * rename chglof frag file
This commit is contained in:
parent
0feabaa7da
commit
d86340b9d3
22 changed files with 219 additions and 214 deletions
|
|
@ -146,7 +146,7 @@ def main():
|
|||
params["version"] = module.params["version"]
|
||||
|
||||
# Build deploy url
|
||||
url = module.params.get('url') + module.params["project_id"] + '/deploys?key=' + module.params["project_key"]
|
||||
url = f"{module.params.get('url')}{module.params['project_id']}/deploys?key={module.params['project_key']}"
|
||||
json_body = module.jsonify(params)
|
||||
|
||||
# Build header
|
||||
|
|
@ -159,7 +159,7 @@ def main():
|
|||
if info['status'] == 200 or info['status'] == 201:
|
||||
module.exit_json(changed=True)
|
||||
else:
|
||||
module.fail_json(msg="HTTP result code: %d connecting to %s" % (info['status'], url))
|
||||
module.fail_json(msg=f"HTTP result code: {info['status']} connecting to {url}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue