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