From e42f8e0d0c18af68ee8d4b9f92dd90592d0d3805 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 7 Aug 2024 14:48:58 +0200 Subject: [PATCH] Make pylint happy. (#789) --- plugins/modules/get_certificate.py | 1 + plugins/modules/openssl_dhparam.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/plugins/modules/get_certificate.py b/plugins/modules/get_certificate.py index 7de6e114..19e0b7af 100644 --- a/plugins/modules/get_certificate.py +++ b/plugins/modules/get_certificate.py @@ -487,6 +487,7 @@ def main(): # If the item is not a string nor integer else: module.fail_json(msg="tls_ctx_options must be a string or integer, got {0!r}".format(tls_ctx_option)) + tls_ctx_option_int = 0 # make pylint happy; this code is actually unreachable try: # Add the int value of the item to ctx options diff --git a/plugins/modules/openssl_dhparam.py b/plugins/modules/openssl_dhparam.py index 2c7d9354..a2327d54 100644 --- a/plugins/modules/openssl_dhparam.py +++ b/plugins/modules/openssl_dhparam.py @@ -398,6 +398,8 @@ def main(): module.fail_json(msg=missing_required_lib('cryptography >= {0}'.format(MINIMAL_CRYPTOGRAPHY_VERSION)), exception=CRYPTOGRAPHY_IMP_ERR) dhparam = DHParameterCryptography(module) + else: + raise AssertionError('Internal error: unknown backend') if module.check_mode: result = dhparam.dump()