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:
Jan Malte Gerth 2016-08-10 11:26:18 +02:00 committed by René Moser
parent 9dde201d87
commit 6a78349f65

View file

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