From d7f60a0e5801e73beedcd005cc86561c8d7984bb Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 5 Dec 2022 10:01:40 -0500 Subject: [PATCH] only check files on inotify --- salt/strelka/filecheck/filecheck | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/strelka/filecheck/filecheck b/salt/strelka/filecheck/filecheck index 314f73a70..bfea89007 100644 --- a/salt/strelka/filecheck/filecheck +++ b/salt/strelka/filecheck/filecheck @@ -74,8 +74,9 @@ def process(filename, hizash): class CreatedEventHandler(FileSystemEventHandler): def on_created(self, event): filename = event.src_path - logging.info("Found new file: " + filename) - checksum(filename) + if os.path.isfile(filename): + logging.info("Found new file: " + filename) + checksum(filename) if __name__ == "__main__": logging.info("Starting filecheck")