Skip to content

Commit

Permalink
fixes #2 empty/missing directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jbest committed Feb 1, 2021
1 parent 7fb05c2 commit 6ccb46f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions barcode-simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,11 @@ def walk(path=None):
# files_processed is number of files which match the expected extensions for image files
print('Files processed:', files_processed)
print('Renames attempted:', renames_attempted)
print('Renames failed:', renames_failed, '({:.1%})'.format(renames_failed/renames_attempted))
print('Missing barcodes:', missing_barcodes, '({:.1%})'.format(missing_barcodes/files_analyzed))
if renames_attempted > 0:
print('Renames failed:', renames_failed, '({:.1%})'.format(renames_failed/renames_attempted))
print('Missing barcodes:', missing_barcodes, '({:.1%})'.format(missing_barcodes/files_analyzed))
else:
print('Input directory not found or contains no images matching search pattern.')
print('Duration:', analysis_end_time - analysis_start_time)
if files_analyzed > 0:
print('Time per file:', (analysis_end_time - analysis_start_time) / files_analyzed)
Expand Down

0 comments on commit 6ccb46f

Please sign in to comment.