From b07b95c0f8c388275e7b3ca3290e7a4a2d1e50a6 Mon Sep 17 00:00:00 2001 From: Gary Long Date: Fri, 12 Apr 2024 13:39:08 -0400 Subject: [PATCH] Changed an "if" to "elif" --- find string in file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find string in file.py b/find string in file.py index eed7e3c..72290b1 100644 --- a/find string in file.py +++ b/find string in file.py @@ -16,7 +16,7 @@ def getfiles(path): abs_path = os.path.abspath(file_name) if os.path.isdir(abs_path): getfiles(abs_path) - if os.path.isfile(abs_path): + elif os.path.isfile(abs_path): f = open(file_name, "r") if text in f.read(): f = 1