From 1d92d9ed08ab9c275d5d72caa69fd9684d17b34a Mon Sep 17 00:00:00 2001 From: Marc-Philip Date: Sun, 30 Jun 2024 20:46:12 +0200 Subject: [PATCH] fix comment --- pio-scripts/patch_apply.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pio-scripts/patch_apply.py b/pio-scripts/patch_apply.py index 0091f3c2..a15ae343 100644 --- a/pio-scripts/patch_apply.py +++ b/pio-scripts/patch_apply.py @@ -23,10 +23,8 @@ def is_tool(name): return which(name) is not None def replaceInFile(in_file, out_file, text, subs, flags=0): - """ - Function for replacing content for the given file - Taken from https://www.studytonight.com/python-howtos/search-and-replace-a-text-in-a-file-in-python - """ + """Function for replacing content for the given file.""" + if os.path.exists(in_file): #read the file contents with open(in_file, "r", encoding="utf-8") as infile: