From 7e6dd2dff012062b8dd812f923339790323b3840 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 25 Oct 2012 12:40:51 +0900 Subject: Fix pylint warning W0108: Lambda may not be necessary Remove unnecessary usage of lambda. Change-Id: I06d41933057d60d15d307ee800cca052a44754c6 --- git_command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git_command.py') diff --git a/git_command.py b/git_command.py index 39f795ff..e5e28f3c 100644 --- a/git_command.py +++ b/git_command.py @@ -88,7 +88,7 @@ class _GitCall(object): ver_str = git.version() if ver_str.startswith('git version '): _git_version = tuple( - map(lambda x: int(x), + map(int, ver_str[len('git version '):].strip().split('-')[0].split('.')[0:3] )) else: @@ -110,7 +110,7 @@ def git_require(min_version, fail=False): if min_version <= git_version: return True if fail: - need = '.'.join(map(lambda x: str(x), min_version)) + need = '.'.join(map(str, min_version)) print >>sys.stderr, 'fatal: git %s or later required' % need sys.exit(1) return False -- cgit v1.2.3-54-g00ecf