Cleanup
This commit is contained in:
parent
d05594dcbc
commit
78ac98fc1b
|
@ -234,10 +234,11 @@ class DeDRM(FileTypePlugin):
|
||||||
# Remove watermarks (Adobe or LemonInk) from all HTML and XHTML files
|
# Remove watermarks (Adobe or LemonInk) from all HTML and XHTML files
|
||||||
path_to_ebook = watermark.removeHTMLwatermarks(self, path_to_ebook) or path_to_ebook
|
path_to_ebook = watermark.removeHTMLwatermarks(self, path_to_ebook) or path_to_ebook
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
postProcessEnd = time.time()
|
postProcessEnd = time.time()
|
||||||
print("{0} v{1}: Post-processing took {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, postProcessEnd-postProcessStart))
|
print("{0} v{1}: Post-processing took {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, postProcessEnd-postProcessStart))
|
||||||
|
|
||||||
|
|
||||||
return path_to_ebook
|
return path_to_ebook
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
@ -487,14 +488,9 @@ class DeDRM(FileTypePlugin):
|
||||||
scriptpath = os.path.join(self.alfdir,"adobekey.py")
|
scriptpath = os.path.join(self.alfdir,"adobekey.py")
|
||||||
defaultkeys, defaultnames = WineGetKeys(scriptpath, ".der",dedrmprefs['adobewineprefix'])
|
defaultkeys, defaultnames = WineGetKeys(scriptpath, ".der",dedrmprefs['adobewineprefix'])
|
||||||
|
|
||||||
try:
|
|
||||||
self.default_key = defaultkeys[0]
|
|
||||||
except:
|
|
||||||
print("{0} v{1}: No ADE key found".format(PLUGIN_NAME, PLUGIN_VERSION))
|
|
||||||
except:
|
except:
|
||||||
print("{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime))
|
print("{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime))
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
self.default_key = ""
|
|
||||||
|
|
||||||
newkeys = []
|
newkeys = []
|
||||||
newnames = []
|
newnames = []
|
||||||
|
@ -669,14 +665,9 @@ class DeDRM(FileTypePlugin):
|
||||||
scriptpath = os.path.join(self.alfdir,"adobekey.py")
|
scriptpath = os.path.join(self.alfdir,"adobekey.py")
|
||||||
defaultkeys, defaultnames = WineGetKeys(scriptpath, ".der",dedrmprefs['adobewineprefix'])
|
defaultkeys, defaultnames = WineGetKeys(scriptpath, ".der",dedrmprefs['adobewineprefix'])
|
||||||
|
|
||||||
try:
|
|
||||||
self.default_key = defaultkeys[0]
|
|
||||||
except:
|
|
||||||
print("{0} v{1}: No ADE key found".format(PLUGIN_NAME, PLUGIN_VERSION))
|
|
||||||
except:
|
except:
|
||||||
print("{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime))
|
print("{0} v{1}: Exception when getting default Adobe Key after {2:.1f} seconds".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime))
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
self.default_key = ""
|
|
||||||
|
|
||||||
newkeys = []
|
newkeys = []
|
||||||
newnames = []
|
newnames = []
|
||||||
|
|
Loading…
Reference in New Issue