diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-08-21 21:01:24 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-08-21 21:01:24 -0700 |
commit | a3185709c7e6fa576ffddac59a9b4ff7e5243e6b (patch) | |
tree | d2196682ec7db08aa5ff201a1a89c1299b473b20 /pym/portage/checksum.py | |
parent | accee1b7c61da284022f86d9ab39bcb492ea4023 (diff) | |
download | portage-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.py | 8 |
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") |