Commit 48df9689 authored by Aram Verstegen's avatar Aram Verstegen
Browse files

Avoid divide by zero

parent ca8f129c
......@@ -504,6 +504,7 @@ class EpubGenerator(object):
# Abort the process if the average word confidence score was too low
if words_found:
average_confidence = total_confidence/words_found
if average_confidence < confidence_threshold:
raise RuntimeError("Average confidence score (%0.02f) too low, please fix input data" % average_confidence)
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