From e4e5808894f9ea7283dc7640d6510e5f045edba2 Mon Sep 17 00:00:00 2001 From: NoDRM Date: Sun, 3 Dec 2023 10:42:41 +0100 Subject: [PATCH] Fix file lock issue in androidkindlekey.py --- CHANGELOG.md | 2 ++ DeDRM_plugin/androidkindlekey.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c10dc19..bf8b806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,3 +103,5 @@ This is v10.0.9, a release candidate for v10.1.0. I don't expect there to be maj - Fix a bug where decrypting a 256-bit AES pdf with V=5 didn't work. - Fix bugs in kgenpids.py, alfcrypto.py, mobidedrm.py and kindlekey.py that caused it to fail on Python 2 (#380). - Fix some bugs (Python 2 and Python 3) in erdr2pml.py (untested). +- Fix file lock bug in androidkindlekey.py on Windows with Calibre >= 7 (untested). + diff --git a/DeDRM_plugin/androidkindlekey.py b/DeDRM_plugin/androidkindlekey.py index 74208e0..27124bd 100755 --- a/DeDRM_plugin/androidkindlekey.py +++ b/DeDRM_plugin/androidkindlekey.py @@ -201,6 +201,9 @@ def get_serials2(path=STORAGE2): for y in tokens: serials.append(y) serials.append(x+y) + + connection.close() + return serials def get_serials(path=STORAGE):