Commit 2fe5d4db authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

better error message when failing on all pages

parent 6eb7abb4
......@@ -99,12 +99,15 @@ def _process_pdf(scan_id, app_config, bind):
if failures:
processed = total - len(failures)
report_error(
f'Processed {processed} / {total} pages. '
f'Failed on pages: {failures}'
)
if processed:
report_error(
f'Processed {processed} / {total} pages. '
f'Failed on pages: {failures}'
)
else:
report_error(f'Failed on all {total} pages.')
else:
report_success(f'processed {total} pages')
report_success(f'Processed {total} pages.')
@orm.db_session
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment