mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Handling if getting title causes an error.
This commit is contained in:
parent
7fef847d3a
commit
9bbb07df91
1 changed files with 5 additions and 2 deletions
|
|
@ -34,5 +34,8 @@ def pdf_modeler(groups: Dict[str, List[File]], _: Session):
|
|||
|
||||
for file in pdf_files:
|
||||
path: pathlib.Path = file.path.path if hasattr(file.path, 'path') else file.path
|
||||
if title := get_pdf_title(path):
|
||||
file.title = title
|
||||
try:
|
||||
if title := get_pdf_title(path):
|
||||
file.title = title
|
||||
except Exception as e:
|
||||
logger.error(f'Unable to get title of {file.path}', exc_info=e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue