summaryrefslogtreecommitdiff
path: root/gitdb/fun.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-24 13:52:45 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-24 15:17:00 +0200
commit941b6c7eff72de618bb34eeb5983ed2795988a32 (patch)
tree181c59742a70480a992dacd1a8b8938a796c541d /gitdb/fun.py
parentfd2eba4079da4bc2b28f975b64c40ce4989711f9 (diff)
downloadgitdb-941b6c7eff72de618bb34eeb5983ed2795988a32.tar.gz
feat(src): subst `reduce` with `sum` for size calcs
+ fix(loose-db): fix bad-attr in ex-message
Diffstat (limited to 'gitdb/fun.py')
-rw-r--r--gitdb/fun.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gitdb/fun.py b/gitdb/fun.py
index 8ca38c8..cf3ad02 100644
--- a/gitdb/fun.py
+++ b/gitdb/fun.py
@@ -12,7 +12,6 @@ decompressobj = zlib.decompressobj
import mmap
from itertools import islice
-from functools import reduce
from gitdb.const import NULL_BYTE, BYTE_SPACE
from gitdb.utils.encoding import force_text
@@ -296,7 +295,7 @@ class DeltaChunkList(list):
:raise AssertionError: if the size doen't match"""
if target_size > -1:
assert self[-1].rbound() == target_size
- assert reduce(lambda x, y: x + y, (d.ts for d in self), 0) == target_size
+ assert sum(d.ts for d in self) == target_size
# END target size verification
if len(self) < 2: