mirror of
https://github.com/apprenticeharper/DeDRM_tools
synced 2024-12-26 09:58:55 +01:00
Update lzma import to include calibre >= 4.6.0
This commit is contained in:
parent
b71ed3887e
commit
fc6f830088
1 changed files with 12 additions and 7 deletions
|
@ -21,9 +21,14 @@ from Crypto.Cipher import AES
|
|||
from Crypto.Util.py3compat import bchr, bord
|
||||
|
||||
try:
|
||||
# lzma library from calibre 2.35.0 or later
|
||||
import lzma.lzma1 as calibre_lzma
|
||||
# lzma library from calibre 4.6.0 or later
|
||||
import calibre_lzma.lzma1 as calibre_lzma
|
||||
except ImportError:
|
||||
calibre_lzma = None
|
||||
# lzma library from calibre 2.35.0 or later
|
||||
try:
|
||||
import lzma.lzma1 as calibre_lzma
|
||||
except ImportError:
|
||||
calibre_lzma = None
|
||||
try:
|
||||
import lzma
|
||||
|
|
Loading…
Reference in a new issue