mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-20 21:21:35 +02:00
Cleaned up cover module
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
from lxml import etree
|
||||
@@ -13,6 +14,10 @@ RECOVER_PARSER = etree.XMLParser(recover=True, no_network=True,
|
||||
resolve_entities=False)
|
||||
|
||||
|
||||
# TODO(gryf): replace this with real logging setup.
|
||||
LOG = logging
|
||||
|
||||
|
||||
class NotHTML(Exception):
|
||||
|
||||
def __init__(self, root_tag):
|
||||
@@ -152,8 +157,7 @@ def check_for_html5(prefix, root):
|
||||
def parse_html(data, log=None, decoder=None, preprocessor=None,
|
||||
filename='<string>', non_html_file_tags=frozenset()):
|
||||
if log is None:
|
||||
from ebook_converter.utils.logging import default_log
|
||||
log = default_log
|
||||
log = LOG
|
||||
|
||||
filename = force_unicode(filename, enc=filesystem_encoding)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user