From 1592f4c814ce2b29e4fe60d104feb0855ec6ecf1 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Fri, 26 Jun 2015 17:14:24 -0400 Subject: [PATCH] updated sample to do name comparison lowercase and restrict to end --- pythonExamples/fileIngestModule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonExamples/fileIngestModule.py b/pythonExamples/fileIngestModule.py index ae814653b4..0fa774a69a 100755 --- a/pythonExamples/fileIngestModule.py +++ b/pythonExamples/fileIngestModule.py @@ -114,7 +114,7 @@ class SampleJythonFileIngestModule(FileIngestModule): return IngestModule.ProcessResult.OK # For an example, we will flag files with .txt in the name and make a blackboard artifact. - if file.getName().find(".txt") != -1: + if file.getName().lower().endswith(".txt"): self.log(Level.INFO, "Found a text file: " + file.getName()) self.filesFound+=1