FIX: throw error if PIL or pillow are not installed

This commit is contained in:
Barbeque Sauce 2020-01-09 13:22:52 -05:00 committed by evilhero
parent 420a3e0570
commit ebc86eb8c1
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,12 @@ from lib.rarfile import rarfile
import mylar
from PIL import Image
try:
from PIL import Image
except ImportError:
logger.debug("WebReader Requested, but PIL or pillow libraries must be installed. Please execute 'pip install pillow', then restart Mylar.")
return serve_template(templatename="index.html", title="Home", comics=comics, alphaindex=mylar.CONFIG.ALPHAINDEX)
from mylar import logger, db, importer, mb, search, filechecker, helpers, updater, parseit, weeklypull, librarysync, moveit, Failed, readinglist, config
from mylar.webserve import serve_template