diff options
author | Helmut Grohne <helmut@subdivi.de> | 2021-12-29 15:04:35 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2021-12-29 15:04:35 +0100 |
commit | 2cb95eb8c68a692b0abb535925e8b55175285ea4 (patch) | |
tree | dab005a8ee7f5c578b98a528a8dd49befc30b932 | |
parent | 529f985adaabfe0c63a1e7ad8d97ec36bb881e52 (diff) | |
download | debian-dedup-2cb95eb8c68a692b0abb535925e8b55175285ea4.tar.gz |
don't return the first parameter from hash_file
Returning the object gets us into trouble as to what precisely the
return type is at no benefit.
-rw-r--r-- | dedup/debpkg.py | 2 | ||||
-rw-r--r-- | dedup/hashing.py | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/dedup/debpkg.py b/dedup/debpkg.py index 0ecb123..de00e60 100644 --- a/dedup/debpkg.py +++ b/dedup/debpkg.py @@ -29,7 +29,7 @@ def get_tar_hashes(tar, hash_functions): if not elem.isreg(): # excludes hard links as well continue hasher = MultiHash(*[func() for func in hash_functions]) - hasher = hash_file(hasher, tar.extractfile(elem)) + hash_file(hasher, tar.extractfile(elem)) hashes = {} for hashobj in hasher.hashes: hashvalue = hashobj.hexdigest() diff --git a/dedup/hashing.py b/dedup/hashing.py index 21f14ea..27f303c 100644 --- a/dedup/hashing.py +++ b/dedup/hashing.py @@ -161,7 +161,6 @@ def hash_file(hashobj, filelike, blocksize=65536): while data: hashobj.update(data) data = filelike.read(blocksize) - return hashobj class HashedStream: """A file-like object, that supports sequential reading and hashes the |