diff options
author | Apprentice Harper <[email protected]> | 2020-10-04 20:36:12 +0100 |
---|---|---|
committer | Apprentice Harper <[email protected]> | 2020-10-04 20:36:12 +0100 |
commit | e31752e3347ca7cc867e1ced37f17c7cab8fb5fe (patch) | |
tree | d9ae314dacbfd9673cf5785e1d3380687b1c8f63 /DeDRM_plugin/kfxdedrm.py | |
parent | 2eb31c8fb5f2f9fe2179516b6265cfe877388a96 (diff) |
Mostly Mac fixes. mobidedrm.py now works, and k4mobidedrm for at least some input. kindlekey.py should be working too. But lots more changes and testing to do.
Diffstat (limited to 'DeDRM_plugin/kfxdedrm.py')
-rw-r--r-- | DeDRM_plugin/kfxdedrm.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/DeDRM_plugin/kfxdedrm.py b/DeDRM_plugin/kfxdedrm.py index 875c4a1..6c1d86a 100644 --- a/DeDRM_plugin/kfxdedrm.py +++ b/DeDRM_plugin/kfxdedrm.py @@ -18,11 +18,6 @@ except ImportError: except ImportError: from io import StringIO -try: - from calibre_plugins.dedrm import ion -except ImportError: - import ion - __license__ = 'GPL v3' __version__ = '2.0' @@ -38,6 +33,10 @@ class KFXZipBook: return (None, None) def processBook(self, totalpids): + try: + import ion + except: + from calibre_plugins.dedrm import ion with zipfile.ZipFile(self.infile, 'r') as zf: for filename in zf.namelist(): with zf.open(filename) as fh: |