mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
modules: update code to python3 (#10904)
* modules: update code to python3 * pamd: rollback changes * add changelog frag * fix/improve assignments using generators * Update plugins/modules/launchd.py Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -192,7 +192,7 @@ class HomebrewException(Exception):
|
||||
# utils ------------------------------------------------------------------- {{{
|
||||
def _create_regex_group_complement(s):
|
||||
lines = (line.strip() for line in s.split('\n') if line.strip())
|
||||
chars = filter(None, (line.split('#')[0].strip() for line in lines))
|
||||
chars = [_f for _f in (line.split('#')[0].strip() for line in lines) if _f]
|
||||
group = r'[^' + r''.join(chars) + r']'
|
||||
return re.compile(group)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user