mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
More code style cleanup
Clean up a few more unnecessary usages of lambda in `repo` that were missed in the previous sweep that only considered files ending in .py. Remove a duplicate import. Change-Id: I03cf467a5630cbe4eee6649520c52e94a7db76be
This commit is contained in:
parent
8898e2f26d
commit
685f080d62
1
main.py
1
main.py
@ -28,7 +28,6 @@ except ImportError:
|
||||
import urllib.request
|
||||
else:
|
||||
# For python2
|
||||
import imp
|
||||
urllib = imp.new_module('urllib')
|
||||
urllib.request = urllib2
|
||||
|
||||
|
10
repo
10
repo
@ -275,9 +275,9 @@ def _CheckGitVersion():
|
||||
raise CloneFailure()
|
||||
|
||||
ver_str = ver_str[len('git version '):].strip()
|
||||
ver_act = tuple(map(lambda x: int(x), ver_str.split('.')[0:3]))
|
||||
ver_act = tuple(map(int, ver_str.split('.')[0:3]))
|
||||
if ver_act < MIN_GIT_VERSION:
|
||||
need = '.'.join(map(lambda x: str(x), MIN_GIT_VERSION))
|
||||
need = '.'.join(map(str, MIN_GIT_VERSION))
|
||||
print >>sys.stderr, 'fatal: git %s or later required' % need
|
||||
raise CloneFailure()
|
||||
|
||||
@ -294,7 +294,7 @@ def NeedSetupGnuPG():
|
||||
if not kv:
|
||||
return True
|
||||
|
||||
kv = tuple(map(lambda x: int(x), kv.split('.')))
|
||||
kv = tuple(map(int, kv.split('.')))
|
||||
if kv < KEYRING_VERSION:
|
||||
return True
|
||||
return False
|
||||
@ -343,7 +343,7 @@ def SetupGnuPG(quiet):
|
||||
print
|
||||
|
||||
fd = open(os.path.join(home_dot_repo, 'keyring-version'), 'w')
|
||||
fd.write('.'.join(map(lambda x: str(x), KEYRING_VERSION)) + '\n')
|
||||
fd.write('.'.join(map(str, KEYRING_VERSION)) + '\n')
|
||||
fd.close()
|
||||
return True
|
||||
|
||||
@ -725,7 +725,7 @@ def main(orig_args):
|
||||
if my_main:
|
||||
repo_main = my_main
|
||||
|
||||
ver_str = '.'.join(map(lambda x: str(x), VERSION))
|
||||
ver_str = '.'.join(map(str, VERSION))
|
||||
me = [repo_main,
|
||||
'--repo-dir=%s' % rel_repo_dir,
|
||||
'--wrapper-version=%s' % ver_str,
|
||||
|
Loading…
Reference in New Issue
Block a user