Fix logging formatting error

This commit is contained in:
Marty Oehme 2023-08-28 12:52:51 +02:00
parent a22cc635b2
commit df235caf8f
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -1,4 +1,5 @@
from pathlib import Path
import re
import click
import fitz_new as fitz
@ -108,10 +109,9 @@ def _get_annotations_for_documents(
print(f"File structure errors for {file}.\n{e}")
if not found_pdf:
logger.warning(
"Did not find suitable PDF file for document: "
f"{papis.document.describe(doc)}"
)
# have to remove curlys or papis logger gets upset
desc = re.sub("[{}]", "", papis.document.describe(doc))
logger.warning("Did not find suitable PDF file for document: " f"{desc}")
output.append(AnnotatedDocument(doc, annotations))
return output