Starting on Version 7.0 using the work done by others. Completely untested. I will be testing things, but I thought I'd get this base version up for others to give pull requests.

THIS IS ON THE MASTER BRANCH. The Master branch will be Python 3.0 from now on. While Python 2.7 support will not be deliberately broken, all efforts should now focus on Python 3.0 compatibility.

I can see a lot of work has been done. There's more to do. I've bumped the version number of everything I came across to the next major number for Python 3.0 compatibility indication.

Thanks everyone. I hope to update here at least once a week until we have a stable 7.0 release for calibre 5.0
This commit is contained in:
Apprentice Harper
2020-09-26 21:22:47 +01:00
parent 4868a7460e
commit afa4ac5716
40 changed files with 757 additions and 729 deletions

View File

@@ -6,13 +6,13 @@ from __future__ import print_function
import sys
import os
import re
import ineptepub
import ignobleepub
import epubtest
import zipfix
import ineptpdf
import erdr2pml
import k4mobidedrm
import calibre_plugins.dedrm.ineptepub
import calibre_plugins.dedrm.ignobleepub
import calibre_plugins.dedrm.epubtest
import calibre_plugins.dedrm.zipfix
import calibre_plugins.dedrm.ineptpdf
import calibre_plugins.dedrm.erdr2pml
import calibre_plugins.dedrm.k4mobidedrm
import traceback
def decryptepub(infile, outdir, rscpath):
@@ -46,7 +46,7 @@ def decryptepub(infile, outdir, rscpath):
if rv == 0:
print("Decrypted Adobe ePub with key file {0}".format(filename))
break
except Exception, e:
except Exception as e:
errlog += traceback.format_exc()
errlog += str(e)
rv = 1
@@ -66,7 +66,7 @@ def decryptepub(infile, outdir, rscpath):
if rv == 0:
print("Decrypted B&N ePub with key file {0}".format(filename))
break
except Exception, e:
except Exception as e:
errlog += traceback.format_exc()
errlog += str(e)
rv = 1
@@ -104,7 +104,7 @@ def decryptpdf(infile, outdir, rscpath):
rv = ineptpdf.decryptBook(userkey, infile, outfile)
if rv == 0:
break
except Exception, e:
except Exception as e:
errlog += traceback.format_exc()
errlog += str(e)
rv = 1
@@ -132,7 +132,7 @@ def decryptpdb(infile, outdir, rscpath):
return 1
try:
rv = erdr2pml.decryptBook(infile, outpath, True, erdr2pml.getuser_key(name, cc8))
except Exception, e:
except Exception as e:
errlog += traceback.format_exc()
errlog += str(e)
rv = 1
@@ -193,7 +193,7 @@ def decryptk4mobi(infile, outdir, rscpath):
androidFiles.append(dpath)
try:
rv = k4mobidedrm.decryptBook(infile, outdir, kDatabaseFiles, androidFiles, serialnums, pidnums)
except Exception, e:
except Exception as e:
errlog += traceback.format_exc()
errlog += str(e)
rv = 1