mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
reuse already split output for filtering (#4310)
there is no need to call out.split('\n') multiple times (line 275 and 277)
This commit is contained in:
parent
81e87cefd7
commit
9549883e78
1 changed files with 1 additions and 1 deletions
|
@ -274,7 +274,7 @@ def main():
|
|||
lines = out.split('\n')
|
||||
filt = globals().get(command + "_filter_output", None)
|
||||
if filt:
|
||||
filtered_output = filter(filt, out.split('\n'))
|
||||
filtered_output = filter(filt, lines)
|
||||
if len(filtered_output):
|
||||
changed = filtered_output
|
||||
|
||||
|
|
Loading…
Reference in a new issue