1
0
Fork 0
mirror of synced 2024-05-20 12:12:40 +12:00

a better check for opts

This commit is contained in:
Piotr Migdal 2022-03-27 21:13:33 +02:00 committed by Serene-Arc
parent 0731de788d
commit 5f443fddff

View file

@ -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():