forked from github/pelican
fix an exception not correctly reporting if the locale is not set
This commit is contained in:
parent
9b0cfd9884
commit
3445066b11
1 changed files with 1 additions and 1 deletions
|
|
@ -390,7 +390,7 @@ def main():
|
|||
# so convert the message to unicode with the correct encoding
|
||||
msg = str(e)
|
||||
if not six.PY3:
|
||||
msg = msg.decode(locale.getpreferredencoding(False))
|
||||
msg = msg.decode(locale.getpreferredencoding())
|
||||
|
||||
logger.critical(msg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue