remove logging_format

This commit is contained in:
Kiryl
2021-10-07 10:14:33 +03:00
parent e693a77182
commit a55eefc7ed
2 changed files with 4 additions and 3 deletions

View File

@@ -14,8 +14,8 @@ from src.book_solver import BookSolver
class DocxBook(BookSolver):
def __init__(self, book_id=0, access=None, html_path=None,
main_logger=None, libra_locker=None, logging_format='%(asctime)s - %(levelname)s - %(message)s'):
super().__init__(book_id, access, main_logger, logging_format)
main_logger=None, libra_locker=None):
super().__init__(book_id, access, main_logger)
self.book_type = 'docx'
self.html_path = html_path # path to html file, file appears after libre-conversion
self.libra_locker: Event() = libra_locker # critical section for occupying libreoffice by one thread
@@ -24,6 +24,7 @@ class DocxBook(BookSolver):
command = ['libreoffice', '--headless',
'--convert-to', 'html', f'{str(self.file_path)}',
'--outdir', f'{out_dir_path}']
print(command)
result = subprocess.run(command, stdout=PIPE, stderr=PIPE)
self.logger_object.log(f'Result of libra conversion for book_{self.book_id}: {result.returncode}, {result.stdout}', logging.DEBUG)
self.logger_object.log(f'Any error while libra conversion for book_{self.book_id}: {result.stderr}', logging.DEBUG)

View File

@@ -304,7 +304,7 @@ class HTMLDocxPreprocessor:
footnote_amt = len(footnote_anchors)
assert footnote_amt == len(footnote_content), \
'Some ting went wrong with footnotes after libra conversion'
'Something went wrong with footnotes after libra conversion'
footnotes = []