summaryrefslogtreecommitdiffstats
path: root/pym/portage/checksum.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-08-21 21:01:24 -0700
committerZac Medico <zmedico@gentoo.org>2012-08-21 21:01:24 -0700
commita3185709c7e6fa576ffddac59a9b4ff7e5243e6b (patch)
treed2196682ec7db08aa5ff201a1a89c1299b473b20 /pym/portage/checksum.py
parentaccee1b7c61da284022f86d9ab39bcb492ea4023 (diff)
downloadportage-a3185709c7e6fa576ffddac59a9b4ff7e5243e6b.tar.gz
portage-a3185709c7e6fa576ffddac59a9b4ff7e5243e6b.tar.bz2
portage-a3185709c7e6fa576ffddac59a9b4ff7e5243e6b.zip
_apply_hash_filter: make hash_filter simpler
Now any callable object will work, which might be helpful for consumers of the Manifest.checkFileHashes() method.
Diffstat (limited to 'pym/portage/checksum.py')
-rw-r--r--pym/portage/checksum.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index de4cc668a..144e6336f 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -250,9 +250,13 @@ def _apply_hash_filter(digests, hash_filter):
dict if no changes are necessary. This will always preserve at
at least one digest, in order to ensure that they are not all
discarded.
+ @param digests: dictionary of digests
+ @type digests: dict
+ @param hash_filter: A callable that takes a single hash name
+ argument, and returns True if the hash is to be used or
+ False otherwise
+ @type hash_filter: callable
"""
- if hash_filter.transparent:
- return digests
verifiable_hash_types = set(digests).intersection(hashfunc_map)
verifiable_hash_types.discard("size")