1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-26 01:50:31 +00:00

Added log message for missing python magic

This commit is contained in:
Ozzie Isaacs 2024-07-08 12:45:35 +02:00
parent b0e8024f08
commit 0fe12fe598

View File

@ -22,15 +22,16 @@ import shutil
import zipfile
import mimetypes
from io import BytesIO
try:
import magic
except ImportError:
pass
from . import logger
log = logger.create()
try:
import magic
except ImportError as e:
log.error("Cannot import python-magic, checking uploaded file metadata will not work: %s", e)
def get_temp_dir():
tmp_dir = os.path.join(gettempdir(), 'calibre_web')