From 74b7747a948ec014b7ec381bff34f79d3485cb45 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 29 Mar 2023 10:57:14 +0200 Subject: [PATCH] minor --- src/netcup_dns/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netcup_dns/main.py b/src/netcup_dns/main.py index 129df15..e797630 100644 --- a/src/netcup_dns/main.py +++ b/src/netcup_dns/main.py @@ -25,9 +25,9 @@ def main(): cfg_files = [file for file in cfg_dir.iterdir() if file.name.endswith('.json') and file.is_file()] for cfg_file in cfg_files: - cfg = json.loads(cfg_file.read_text()) + cfg: dict = json.loads(cfg_file.read_text()) - if len(cfg) == 0 or cfg['disabled'] is True: + if len(cfg) == 0 or ('disabled' in cfg and cfg['disabled'] is True): # Skip empty or disabled configuration file. continue