From 6e7a8ac09b5ea973c1de7d3789a30939ce4fdc9c Mon Sep 17 00:00:00 2001 From: waschinski <25221082+waschinski@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:05:13 +0200 Subject: [PATCH] Do not call extract_cert on empty events --- extract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract.py b/extract.py index 9c8d613..c7a6984 100644 --- a/extract.py +++ b/extract.py @@ -12,7 +12,7 @@ class ConfigFileHandler(FileSystemEventHandler): def on_modified(self, event): - if event.src_path == INPUT_PATH + "/cosmos.config.json": + if event.src_path == INPUT_PATH + "/cosmos.config.json" and os.path.getsize(event.src_path) > 0: extract_cert() def extract_cert():