mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Python 3: there's no itertools.imap
Because the builtin map() acts like an iterator already.
This commit is contained in:
parent
6708d56a21
commit
2c4982b58d
1 changed files with 6 additions and 1 deletions
|
@ -66,7 +66,12 @@ import grp
|
||||||
import pwd
|
import pwd
|
||||||
import platform
|
import platform
|
||||||
import errno
|
import errno
|
||||||
from itertools import imap, repeat
|
from itertools import repeat
|
||||||
|
|
||||||
|
try:
|
||||||
|
from itertools import imap # Python 2
|
||||||
|
except ImportError:
|
||||||
|
imap = map # Python 3
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue