Skip to content

Commit a6b1306

Browse files
yangskyboxlabsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4294d74 commit a6b1306

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-p4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
sys.exit(1)
1414
import os
1515
import optparse
16+
import functools
1617
import marshal
1718
import subprocess
1819
import tempfile
@@ -1158,7 +1159,7 @@ def pushFile(self, localLargeFile):
11581159
assert False, "Method 'pushFile' required in " + self.__class__.__name__
11591160

11601161
def hasLargeFileExtension(self, relPath):
1161-
return reduce(
1162+
return functools.reduce(
11621163
lambda a, b: a or b,
11631164
[relPath.endswith('.' + e) for e in gitConfigList('git-p4.largeFileExtensions')],
11641165
False

0 commit comments

Comments
 (0)