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 <yang.zhao@skyboxlabs.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
4294d741cc
commit
a6b1306735
|
@ -13,6 +13,7 @@ if sys.version_info.major < 3 and sys.version_info.minor < 7:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
import os
|
import os
|
||||||
import optparse
|
import optparse
|
||||||
|
import functools
|
||||||
import marshal
|
import marshal
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -1158,7 +1159,7 @@ class LargeFileSystem(object):
|
||||||
assert False, "Method 'pushFile' required in " + self.__class__.__name__
|
assert False, "Method 'pushFile' required in " + self.__class__.__name__
|
||||||
|
|
||||||
def hasLargeFileExtension(self, relPath):
|
def hasLargeFileExtension(self, relPath):
|
||||||
return reduce(
|
return functools.reduce(
|
||||||
lambda a, b: a or b,
|
lambda a, b: a or b,
|
||||||
[relPath.endswith('.' + e) for e in gitConfigList('git-p4.largeFileExtensions')],
|
[relPath.endswith('.' + e) for e in gitConfigList('git-p4.largeFileExtensions')],
|
||||||
False
|
False
|
||||||
|
|
Loading…
Reference in New Issue