python/sepolicy: Use list instead of map

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@redhat.com>
This commit is contained in:
Petr Lautrbach 2018-02-13 13:12:47 +01:00 committed by stephensmalley
parent aeef83ca16
commit 7281132977

View file

@ -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()