Added exception catching for file format check

pull/596/head
bodybybuddha 6 years ago
parent 4f386c8a00
commit fc78d1ee07

@ -3186,7 +3186,10 @@ def edit_book(book_id):
#Determine what formats don't already exist #Determine what formats don't already exist
allowed_conversion_formats = ALLOWED_EXTENSIONS allowed_conversion_formats = ALLOWED_EXTENSIONS
for file in book.data: for file in book.data:
try:
allowed_conversion_formats.remove(file.format.lower()) allowed_conversion_formats.remove(file.format.lower())
except Exception:
app.logger.warning(file.formate.lower() + ' already removed from list.')
app.logger.debug(allowed_conversion_formats) app.logger.debug(allowed_conversion_formats)

Loading…
Cancel
Save