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:
Alexei Znamensky 2025-10-23 17:50:32 +13:00 committed by GitHub
commit d86340b9d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 219 additions and 214 deletions

View file

@ -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__':