mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-02 08:09:13 +00:00
Swapped stacktrace to logging.exception in file_deleter.py
This commit is contained in:
committed by
Travis Abendshien
parent
8d19bef152
commit
6b15a58e3f
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user