summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorYang Zhao <yang.zhao@skyboxlabs.com>2019-12-13 23:52:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-01-15 20:53:40 (GMT)
commita6b1306735f1a6450f22f562275c994d03324672 (patch)
tree6aa8130ce56295dfc9908f689f9e9b3b7adc169f /git-p4.py
parent4294d741cc13e1f5533efaa693e4479c62b28873 (diff)
downloadgit-a6b1306735f1a6450f22f562275c994d03324672.zip
git-a6b1306735f1a6450f22f562275c994d03324672.tar.gz
git-a6b1306735f1a6450f22f562275c994d03324672.tar.bz2
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>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 68f9f4f..7deee1b 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