Swapped stacktrace to logging.exception in file_deleter.py

This commit is contained in:
peterbousaada
2024-06-13 11:56:22 -04:00
committed by Travis Abendshien
parent 8d19bef152
commit 6b15a58e3f

View File

@@ -9,6 +9,7 @@ INFO = f"[INFO]"
logging.basicConfig(format="%(message)s", level=logging.INFO)
def delete_file(path: str | Path, callback: Callable):
_path = str(path)
_file = Path(_path)
@@ -19,8 +20,8 @@ def delete_file(path: str | Path, callback: Callable):
try:
_file.unlink()
callback()
except:
traceback.print_exc()
except Exception as exception:
logging.exception(exception)
class FileDeleterHelper: