public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/
Date: Fri, 17 Apr 2020 19:52:26 +0000 (UTC)	[thread overview]
Message-ID: <1587149723.bcffd2ef3fc347d6ce346a1737ddbd0ed0b7dff6.mattst88@gentoo> (raw)

commit:     bcffd2ef3fc347d6ce346a1737ddbd0ed0b7dff6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 17:27:08 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 18:55:23 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bcffd2ef

catalyst: Make conf_values['digests'] a set

This makes it automatically deduplicate values (which I honestly don't
really care about) but also makes it so users don't need to .split()
themselves.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 2 +-
 catalyst/main.py         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index bc7f9375..eb09a4e0 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -37,5 +37,5 @@ class GenBase():
 
         with io.open(path + '.DIGESTS', 'w', encoding='utf-8') as file:
             for f in [path, path + '.CONTENTS']:
-                for i in self.settings['digests'].split():
+                for i in self.settings['digests']:
                     file.write(self.generate_hash(f, name=i))

diff --git a/catalyst/main.py b/catalyst/main.py
index d8e791c4..c91fc8b6 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -341,8 +341,9 @@ def _main(parser, opts):
     # TODO add capability to config/spec new definitions
 
     if "digests" in conf_values:
-        digests = set(conf_values['digests'].split())
         valid_digests = hashlib.algorithms_available
+        digests = set(conf_values['digests'].split())
+        conf_values['digests'] = digests
 
         # First validate all the requested digests are valid keys.
         if digests - valid_digests:


             reply	other threads:[~2020-04-17 19:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 19:52 Matt Turner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-07-01 19:27 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/, catalyst/ Andreas K. Hüttel
2021-02-28 14:39 Andreas K. Hüttel
2021-02-20 21:27 Matt Turner
2020-10-30 22:41 Matt Turner
2020-04-13 20:36 Matt Turner
2020-01-27 18:52 Rick Farina
2016-05-22  3:34 Mike Frysinger
2016-03-23 16:38 Brian Dolbec
2016-03-21  5:15 Mike Frysinger
2015-10-08 20:02 Brian Dolbec
2015-09-08 14:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26  4:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1587149723.bcffd2ef3fc347d6ce346a1737ddbd0ed0b7dff6.mattst88@gentoo \
    --to=mattst88@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox