From 9549883e78fff7923fcb8977d38bc4d24ec7fc97 Mon Sep 17 00:00:00 2001 From: Jan Malte Gerth Date: Wed, 10 Aug 2016 11:26:18 +0200 Subject: [PATCH] reuse already split output for filtering (#4310) there is no need to call out.split('\n') multiple times (line 275 and 277) --- lib/ansible/modules/web_infrastructure/django_manage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/web_infrastructure/django_manage.py b/lib/ansible/modules/web_infrastructure/django_manage.py index e1447d5d17..5467346505 100644 --- a/lib/ansible/modules/web_infrastructure/django_manage.py +++ b/lib/ansible/modules/web_infrastructure/django_manage.py @@ -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