From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4DE2713835A for ; Wed, 20 May 2020 01:52:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 825D1E086D; Wed, 20 May 2020 01:52:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 680C1E086C for ; Wed, 20 May 2020 01:52:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7175834F19F for ; Wed, 20 May 2020 01:52:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AE767262 for ; Wed, 20 May 2020 01:52:26 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589939377.8443f89f3c5dfbc011a333e90bfef772a95e47cd.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 8443f89f3c5dfbc011a333e90bfef772a95e47cd X-VCS-Branch: wip/mattst88 Date: Wed, 20 May 2020 01:52:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5701c5d7-24db-4fe3-89ce-3d1637075d92 X-Archives-Hash: 3ec4c62954a33677fd79a67935352a9f commit: 8443f89f3c5dfbc011a333e90bfef772a95e47cd Author: Matt Turner gentoo org> AuthorDate: Tue May 19 00:13:14 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 01:49:37 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8443f89f catalyst: Verify config options against valid_config_file_values Signed-off-by: Matt Turner 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) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 576ED1382C5 for ; Thu, 21 May 2020 20:25:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 89AFAE09BB; Thu, 21 May 2020 20:25:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 74D90E09BB for ; Thu, 21 May 2020 20:25:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0364134F2BC for ; Thu, 21 May 2020 20:25:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BBD0263 for ; Thu, 21 May 2020 20:25:34 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589939377.8443f89f3c5dfbc011a333e90bfef772a95e47cd.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 8443f89f3c5dfbc011a333e90bfef772a95e47cd X-VCS-Branch: master Date: Thu, 21 May 2020 20:25:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 75044e6b-e7be-4317-b618-7a707399fe0a X-Archives-Hash: 22b72807f1f55487d276765450bff527 Message-ID: <20200521202534.9PiRX236s8BFvk6QWs6r4AnylL9jdMBKTpcG2oM6RMM@z> commit: 8443f89f3c5dfbc011a333e90bfef772a95e47cd Author: Matt Turner gentoo org> AuthorDate: Tue May 19 00:13:14 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 01:49:37 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8443f89f catalyst: Verify config options against valid_config_file_values Signed-off-by: Matt Turner 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) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C0EED1382C5 for ; Wed, 20 May 2020 03:40:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5BBF2E0887; Wed, 20 May 2020 03:39:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 45994E0886 for ; Wed, 20 May 2020 03:39:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5F36434F1CE for ; Wed, 20 May 2020 03:39:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9860B263 for ; Wed, 20 May 2020 03:39:53 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589939377.8443f89f3c5dfbc011a333e90bfef772a95e47cd.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 8443f89f3c5dfbc011a333e90bfef772a95e47cd X-VCS-Branch: pending/mattst88 Date: Wed, 20 May 2020 03:39:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d10873fd-8277-47b2-944e-206b497606cd X-Archives-Hash: e1bd9893fb0463aae215b180c30f8538 Message-ID: <20200520033953._SDX92EYdVE6B2HHqq1SGg8SOlJZmoiQKgbQ-vy2IK0@z> commit: 8443f89f3c5dfbc011a333e90bfef772a95e47cd Author: Matt Turner gentoo org> AuthorDate: Tue May 19 00:13:14 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 01:49:37 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8443f89f catalyst: Verify config options against valid_config_file_values Signed-off-by: Matt Turner 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)