From 5f443fddff952b0f21fe920b5ffbb4721023252a Mon Sep 17 00:00:00 2001 From: Piotr Migdal Date: Sun, 27 Mar 2022 21:13:33 +0200 Subject: [PATCH] a better check for opts --- bdfr/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdfr/configuration.py b/bdfr/configuration.py index 856c90b..2468ba9 100644 --- a/bdfr/configuration.py +++ b/bdfr/configuration.py @@ -53,7 +53,7 @@ class Configuration(Namespace): self.comment_context: bool = False def process_click_arguments(self, context: click.Context): - if context.params['opts'] is not None: + if context.params.get('opts') is not None: with open(context.params['opts']) as f: opts = yaml.load(f, Loader=yaml.FullLoader) for arg_key, val in opts.items():