From a3185709c7e6fa576ffddac59a9b4ff7e5243e6b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 21 Aug 2012 21:01:24 -0700 Subject: _apply_hash_filter: make hash_filter simpler Now any callable object will work, which might be helpful for consumers of the Manifest.checkFileHashes() method. --- pym/portage/checksum.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pym/portage/checksum.py') 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") -- cgit v1.2.3-1-g7c22