More Python2 bugfixes

This commit is contained in:
NoDRM
2023-08-03 20:01:38 +02:00
parent e509b7d520
commit bc089ee46d
7 changed files with 75 additions and 19 deletions

View File

@@ -96,7 +96,10 @@ import traceback
#@@CALIBRE_COMPAT_CODE@@
try:
import __version
try:
from . import __version
except:
import __version
except:
print("#############################")
print("Failed to load the DeDRM plugin")
@@ -134,8 +137,10 @@ try:
except:
config_dir = ""
import utilities
try:
from . import utilities
except:
import utilities
PLUGIN_NAME = __version.PLUGIN_NAME
@@ -915,6 +920,9 @@ class DeDRM(FileTypePlugin):
# perhaps we need to get a new default Kindle for Mac/PC key
defaultkeys = []
print("{0} v{1}: Failed to decrypt with error: {2}".format(PLUGIN_NAME, PLUGIN_VERSION,e.args[0]))
traceback.print_exc()
print("{0} v{1}: Looking for new default Kindle Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime))
try: