From f838a32cb5b51410a5371b67abb3eebaf6e5db17 Mon Sep 17 00:00:00 2001 From: Christian Zangl Date: Tue, 3 May 2022 23:12:23 +0200 Subject: [PATCH] format & improve error logging --- chkbit/hashfile.py | 2 +- chkbit/indexthread.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chkbit/hashfile.py b/chkbit/hashfile.py index e8f5b00..f48c385 100644 --- a/chkbit/hashfile.py +++ b/chkbit/hashfile.py @@ -1,7 +1,7 @@ import hashlib -BLOCKSIZE = 2**10 * 128 # kb +BLOCKSIZE = 2 ** 10 * 128 # kb def hashfile(path, hash_algo=None): diff --git a/chkbit/indexthread.py b/chkbit/indexthread.py index bd132ef..ce946bb 100644 --- a/chkbit/indexthread.py +++ b/chkbit/indexthread.py @@ -65,5 +65,5 @@ class IndexThread: try: self._process_root(parent) except Exception as e: - self._log(Stat.INTERNALEXCEPTION, e) + self._log(Stat.INTERNALEXCEPTION, f"{parent}: {e}") self.todo_queue.task_done()