From: Yang Zhao Date: Fri, 13 Dec 2019 23:52:44 +0000 (-0800) Subject: git-p4: use functools.reduce instead of reduce X-Git-Tag: v2.27.0-rc0~165^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6b1306735f1a6450f22f562275c994d03324672;p=thirdparty%2Fgit.git git-p4: use functools.reduce instead of reduce For python3, reduce() has been moved to functools.reduce(). This is also available in python2.7. Signed-off-by: Yang Zhao Signed-off-by: Junio C Hamano --- diff --git a/git-p4.py b/git-p4.py index 68f9f4fdc6..7deee1b939 100755 --- a/git-p4.py +++ b/git-p4.py @@ -13,6 +13,7 @@ if sys.version_info.major < 3 and sys.version_info.minor < 7: sys.exit(1) import os import optparse +import functools import marshal import subprocess import tempfile @@ -1158,7 +1159,7 @@ class LargeFileSystem(object): assert False, "Method 'pushFile' required in " + self.__class__.__name__ def hasLargeFileExtension(self, relPath): - return reduce( + return functools.reduce( lambda a, b: a or b, [relPath.endswith('.' + e) for e in gitConfigList('git-p4.largeFileExtensions')], False