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:wip/mattst88 commit in: catalyst/
Date: Tue, 19 May 2020 23:45:33 +0000 (UTC)	[thread overview]
Message-ID: <1589931926.2751ef36ebb4d2d81a847e43578292794e16da19.mattst88@gentoo> (raw)

commit:     2751ef36ebb4d2d81a847e43578292794e16da19
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue May 19 00:13:14 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue May 19 23:45:26 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2751ef36

catalyst: Verify config options against valid_config_file_values

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

 catalyst/main.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/catalyst/main.py b/catalyst/main.py
index 159fe454..543895c6 100644
--- a/catalyst/main.py
+++ b/catalyst/main.py
@@ -15,7 +15,8 @@ from DeComp.contents import ContentsMap
 
 from catalyst import log
 import catalyst.config
-from catalyst.defaults import confdefaults, option_messages, DEFAULT_CONFIG_FILE
+from catalyst.defaults import (confdefaults, option_messages,
+                               DEFAULT_CONFIG_FILE, valid_config_file_values)
 from catalyst.support import CatalystError
 from catalyst.version import get_version
 
@@ -34,7 +35,12 @@ def parse_config(config_files):
     for config_file in config_files:
         log.notice('Loading configuration file: %s', config_file)
         try:
-            conf_values.update(toml.load(config_file))
+            config = toml.load(config_file)
+            for key in config:
+                if key not in valid_config_file_values:
+                    log.critical("Unknown option '%s' in config file %s",
+                                 key, config_file)
+            conf_values.update(config)
         except Exception as e:
             log.critical('Could not find parse configuration file: %s: %s',
                          config_file, e)


             reply	other threads:[~2020-05-19 23:45 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 23:45 Matt Turner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-20  0:21 [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/ Matt Turner
2021-06-11  3:30 [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-06-10  0:48 Matt Turner
2021-02-20 21:27 [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-01-29 23:50 Matt Turner
2021-01-29 23:50 Matt Turner
2020-11-14 16:37 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-12-19 19:56 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-30 22:41 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-12-19 19:56 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-21 20:26 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-27  6:20 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-21 20:25 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-20  1:52 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-21 20:25 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-20  1:52 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-21 20:25 [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-20  1:52 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-20  3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-20  3:39 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-20  3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-20  1:52 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-20  2:33 Matt Turner
2020-05-20  2:29 Matt Turner
2020-05-20  1:52 Matt Turner
2020-05-20  1:52 Matt Turner
2020-05-20  1:52 Matt Turner
2020-05-20  1:52 Matt Turner
2020-05-20  1:52 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-20  0:26 Matt Turner
2020-05-19 23:45 Matt Turner
2020-05-19 23:39 Matt Turner
2020-05-19 23:39 Matt Turner
2020-05-19 23:30 Matt Turner
2020-05-19 23:30 Matt Turner
2020-05-19 23:04 Matt Turner
2020-05-19 23:04 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner
2020-05-19 22:55 Matt Turner

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=1589931926.2751ef36ebb4d2d81a847e43578292794e16da19.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