Added log message for missing python magic
This commit is contained in:
parent
bc1c097271
commit
d26964ab08
|
@ -22,15 +22,16 @@ import shutil
|
||||||
import zipfile
|
import zipfile
|
||||||
import mimetypes
|
import mimetypes
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
try:
|
|
||||||
import magic
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
from . import logger
|
from . import logger
|
||||||
|
|
||||||
log = logger.create()
|
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():
|
def get_temp_dir():
|
||||||
tmp_dir = os.path.join(gettempdir(), 'calibre_web')
|
tmp_dir = os.path.join(gettempdir(), 'calibre_web')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user