mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Update capabilities.py (#23879)
Fixes issue when using python3 interpreter: 'filter' object has no attribute 'append' Ensure list type of data is used before appending data.
This commit is contained in:
parent
a31f4c178a
commit
b146ba37da
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ class CapabilitiesModule(object):
|
|||
self.module.exit_json(changed=True, msg='capabilities changed')
|
||||
else:
|
||||
# remove from current cap list if it's already set (but op/flags differ)
|
||||
current = filter(lambda x: x[0] != self.capability_tup[0], current)
|
||||
current = list(filter(lambda x: x[0] != self.capability_tup[0], current))
|
||||
# add new cap with correct op/flags
|
||||
current.append( self.capability_tup )
|
||||
self.module.exit_json(changed=True, state=self.state, msg='capabilities changed', stdout=self.setcap(self.path, current))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue