diff --git a/changelogs/fragments/10981-keyring-shlex.yml b/changelogs/fragments/10981-keyring-shlex.yml new file mode 100644 index 0000000000..8034ebe55d --- /dev/null +++ b/changelogs/fragments/10981-keyring-shlex.yml @@ -0,0 +1,3 @@ +minor_changes: + - keyring - remove provisions for unsupported Python versions (https://github.com/ansible-collections/community.general/pull/10981). + - keyring_info - remove provisions for unsupported Python versions (https://github.com/ansible-collections/community.general/pull/10981). diff --git a/plugins/modules/keyring.py b/plugins/modules/keyring.py index 8805a82e09..9653ef1ad5 100644 --- a/plugins/modules/keyring.py +++ b/plugins/modules/keyring.py @@ -76,10 +76,7 @@ EXAMPLES = r""" state: absent """ -try: - from shlex import quote -except ImportError: - from pipes import quote +from shlex import quote import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib diff --git a/plugins/modules/keyring_info.py b/plugins/modules/keyring_info.py index 6ece284533..cddc2f973b 100644 --- a/plugins/modules/keyring_info.py +++ b/plugins/modules/keyring_info.py @@ -62,10 +62,7 @@ passphrase: sample: Password123 """ -try: - from shlex import quote -except ImportError: - from pipes import quote +from shlex import quote import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib