map() returns an iterator in python3, list in python2 Fixes: File "/usr/lib/python3.6/site-packages/sepolicy/generate.py", line 114, in get_all_users users.remove("system_u") AttributeError: 'map' object has no attribute 'remove' Signed-off-by: Petr Lautrbach <plautrba@xxxxxxxxxx> --- python/sepolicy/sepolicy/generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sepolicy/sepolicy/generate.py b/python/sepolicy/sepolicy/generate.py index d68f96ef..1b36eb6e 100644 --- a/python/sepolicy/sepolicy/generate.py +++ b/python/sepolicy/sepolicy/generate.py @@ -110,7 +110,7 @@ def get_all_ports(): def get_all_users(): - users = map(lambda x: x['name'], sepolicy.info(sepolicy.USER)) + users = [x['name'] for x in sepolicy.info(sepolicy.USER)] users.remove("system_u") users.remove("root") users.sort() -- 2.16.1