mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-01-17 13:20:37 +06:00
Use pylzma as a fallback
This commit is contained in:
parent
7b45d2128c
commit
4f1e9fcf43
@ -23,13 +23,17 @@ from Crypto.Util.py3compat import bchr, bord
|
|||||||
try:
|
try:
|
||||||
# lzma library from calibre 2.35.0 or later
|
# lzma library from calibre 2.35.0 or later
|
||||||
import lzma.lzma1 as calibre_lzma
|
import lzma.lzma1 as calibre_lzma
|
||||||
except:
|
except ImportError:
|
||||||
calibre_lzma = None
|
calibre_lzma = None
|
||||||
try:
|
try:
|
||||||
import lzma
|
import lzma
|
||||||
except:
|
except ImportError:
|
||||||
# Need pip backports.lzma on Python <3.3
|
# Need pip backports.lzma on Python <3.3
|
||||||
from backports import lzma
|
try:
|
||||||
|
from backports import lzma
|
||||||
|
except ImportError:
|
||||||
|
# Windows-friendly choice: pylzma wheels
|
||||||
|
import pylzma as lzma
|
||||||
|
|
||||||
|
|
||||||
TID_NULL = 0
|
TID_NULL = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user