commit: fe133e8058ecfcad654ae80bdfbf7359237d4ec5
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 07:11:33 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 07:14:44 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fe133e80
catalyst: Remove dead 'all' digests case
Generating close to 30 digests is not a sensible thing to do in general,
but worse this code was not possible: 'all' was not a valid digest
option since it is not a key in HASH_DEFINITIONS.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/base/genbase.py | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index f55b113f..2dc8bad0 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -39,11 +39,6 @@ class GenBase():
with io.open(digests, "w", encoding='utf-8') as myf:
for f in [path, path + '.CONTENTS']:
if os.path.exists(f):
- if "all" in self.settings["digests"].split():
- for k in list(hash_map.hash_map):
- digest = hash_map.generate_hash(f, hash_=k)
- myf.write(digest)
- else:
- for j in self.settings["digests"].split():
- digest = hash_map.generate_hash(f, hash_=j)
- myf.write(digest)
+ for i in self.settings["digests"].split():
+ digest = hash_map.generate_hash(f, hash_=i)
+ myf.write(digest)