This commit is contained in:
Daniel Langbein 2023-03-29 10:57:14 +02:00
parent 27492ba1ef
commit 74b7747a94

View File

@ -25,9 +25,9 @@ def main():
cfg_files = [file for file in cfg_dir.iterdir() if file.name.endswith('.json') and file.is_file()] cfg_files = [file for file in cfg_dir.iterdir() if file.name.endswith('.json') and file.is_file()]
for cfg_file in cfg_files: 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. # Skip empty or disabled configuration file.
continue continue