From 9c9084b0f116f0722dd80991cc9eee57f05fa46c Mon Sep 17 00:00:00 2001 From: derek-hirotsu <132305781+derek-hirotsu@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:40:26 -0700 Subject: [PATCH] Misc log (#57) * add logging when attempting to remove non-existant file * update changelog --- CHANGELOG.md | 4 ++++ harness_utils/misc.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89e6b7e..992c5cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. Changes are grouped by the date they are merged to the main branch of the repository and are ordered from newest to oldest. Dates use the ISO 8601 extended calendar date format, i.e. YYYY-MM-DD. +## 2023-09-29 + +- Add logging to `harness_utils.misc.remove_files` when attempting to remove a file that doesn't exist. + ## 2023-09-27 - First \ No newline at end of file diff --git a/harness_utils/misc.py b/harness_utils/misc.py index 1d2bc22..5c5bd0c 100644 --- a/harness_utils/misc.py +++ b/harness_utils/misc.py @@ -11,4 +11,4 @@ def remove_files(paths: list[str]) -> None: os.remove(path) logging.info("Removed file: %s", path) except FileNotFoundError: - pass + logging.info("File already removed: %s", path)