mirror of
https://github.com/QingdaoU/Spirit.git
synced 2024-12-28 15:32:12 +00:00
fix "no module named magic" error
This commit is contained in:
parent
eaf745880f
commit
f06f2118c5
@ -26,10 +26,11 @@ try:
|
||||
except ImportError as err:
|
||||
# There used to be a logger.exception here but
|
||||
# the traceback made things confusing when an unhandled was raised
|
||||
logger.warning(
|
||||
'Can\'t load python-magic. '
|
||||
'Is libmagic installed?')
|
||||
logger.error(err)
|
||||
if settings.ST_UPLOAD_FILE_ENABLED:
|
||||
logger.warning(
|
||||
'Can\'t load python-magic. '
|
||||
'Is libmagic installed?')
|
||||
logger.error(err)
|
||||
magic = None
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user