From aa44bf1cd17b7f261acfd7b3e9a2eecc4d21b238 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 9 May 2019 07:10:06 -0400 Subject: [PATCH] py3: hashlib .hexdigest() always returns a hexadecimal string This is a subset of ascii and cannot be decoded. --- src/calibre/srv/books.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/srv/books.py b/src/calibre/srv/books.py index 3fd0bed4da..d8ceeede36 100644 --- a/src/calibre/srv/books.py +++ b/src/calibre/srv/books.py @@ -50,7 +50,7 @@ def books_cache_dir(): def book_hash(library_uuid, book_id, fmt, size, mtime): raw = json_dumps((library_uuid, book_id, fmt.upper(), size, mtime, RENDER_VERSION)) - return sha1(raw).hexdigest().decode('ascii') + return sha1(raw).hexdigest() staging_cleaned = False