mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 22:03:01 +00:00
Work on issues found by pylint (#896)
* Look at possibly-used-before-assignment. * Use latest beta releases of ansible-core 2.19 for mypy and pylint. * Look at unsupported-*. * Look at unknown-option-value. * Look at redefined-builtin. * Look at superfluous-parens. * Look at unspecified-encoding. * Adjust to new cryptography version and to ansible-core 2.17's pylint. * Look at super-with-arguments. * Look at no-else-*. * Look at try-except-raise. * Look at inconsistent-return-statements. * Look at redefined-outer-name. * Look at redefined-argument-from-local. * Look at attribute-defined-outside-init. * Look at unused-variable. * Look at protected-access. * Look at raise-missing-from. * Look at arguments-differ. * Look at useless-suppression and use-symbolic-message-instead. * Look at consider-using-dict-items. * Look at consider-using-in. * Look at consider-using-set-comprehension. * Look at consider-using-with. * Look at use-dict-literal.
This commit is contained in:
@@ -166,11 +166,11 @@ class ACMECertificateClient:
|
||||
continue
|
||||
challenge_data = authz.get_challenge_data(client=self.client)
|
||||
data.append(
|
||||
dict(
|
||||
identifier=authz.identifier,
|
||||
identifier_type=authz.identifier_type,
|
||||
challenges=challenge_data,
|
||||
)
|
||||
{
|
||||
"identifier": authz.identifier,
|
||||
"identifier_type": authz.identifier_type,
|
||||
"challenges": challenge_data,
|
||||
}
|
||||
)
|
||||
dns_challenge = challenge_data.get(dns_challenge_type)
|
||||
if dns_challenge:
|
||||
@@ -321,7 +321,7 @@ class ACMECertificateClient:
|
||||
"""
|
||||
if self.csr is None and self.csr_content is None:
|
||||
raise ModuleFailException("No CSR has been provided")
|
||||
for identifier, authz in order.authorizations.items():
|
||||
for authz in order.authorizations.values():
|
||||
if authz.status != "valid":
|
||||
authz.raise_error(
|
||||
error_msg=f'Status is {authz.status!r} and not "valid"',
|
||||
|
||||
Reference in New Issue
Block a user