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
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