1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-03 08:52:55 +00:00

remove Python2 some constructs/docs/comments (#10892)

* remove Python2 some constructs/docs/comments

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-11 06:15:01 +13:00 committed by GitHub
parent 5f471b8e5b
commit 633bd6133a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 22 additions and 47 deletions

View file

@ -114,12 +114,6 @@ name:
sample: startmyservice
"""
# Import necessary libraries
try:
# python 2
from itertools import izip
except ImportError:
izip = zip
from ansible.module_utils.basic import AnsibleModule
@ -138,7 +132,7 @@ def check_current_entry(module):
values = out.split(":")
# strip non readable characters as \n
values = map(lambda s: s.strip(), values)
existsdict = dict(izip(keys, values))
existsdict = dict(zip(keys, values))
existsdict.update({'exist': True})
return existsdict