Skip to content

Commit

Permalink
fix "no module named magic" error
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Jan 31, 2018
1 parent eaf7458 commit f06f211
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spirit/comment/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
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


Expand Down

0 comments on commit f06f211

Please sign in to comment.