[PATCH 3/3] Do not create lambda over and over in a cycle

Vratislav Podzimek vpodzime at redhat.com
Wed Jan 21 10:50:36 UTC 2015


Let's just define and create it once and use it over and over.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 scripts/makebumpver | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/makebumpver b/scripts/makebumpver
index 57f549f..07ce065 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -240,8 +240,9 @@ class MakeBumpVer:
                        proc[0].strip('\n').split('\n'))
 
         if self.ignore and self.ignore != '':
+            startswith_commit = lambda x: not x.startswith(commit)
             for commit in self.ignore.split(','):
-                lines = filter(lambda x: not x.startswith(commit), lines)
+                lines = filter(startswith_commit, lines)
 
         rpm_log = []
         bad_bump = False
-- 
2.1.0



More information about the anaconda-patches mailing list