ansible-core 2.20: avoid deprecated functionality (#953)

* Avoid deprecated functionality.

* Lint.

* Fix typing.

* Python 3.7/3.8 compat.
This commit is contained in:
Felix Fontein
2025-08-17 22:30:10 +02:00
committed by GitHub
parent 1bfee3c23b
commit c0072d29f5
4 changed files with 27 additions and 17 deletions

View File

@@ -320,11 +320,12 @@ def main() -> t.NoReturn:
result["account_uri"] = client.account_uri
result["exists"] = True
# Make sure promised data is there
account_data_dict = dict(account_data)
if "contact" not in account_data:
account_data["contact"] = []
account_data_dict["contact"] = []
if client.account_key_data:
account_data["public_account_key"] = client.account_key_data["jwk"]
result["account"] = account_data
account_data_dict["public_account_key"] = client.account_key_data["jwk"]
result["account"] = account_data_dict
# Retrieve orders list
if (
account_data.get("orders")