mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-03 00:43:07 +00:00
remove Python2 some constructs/docs/comments (#10892)
* remove Python2 some constructs/docs/comments * add changelog frag
This commit is contained in:
parent
5f471b8e5b
commit
633bd6133a
12 changed files with 22 additions and 47 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue