1
0
Fork 0
forked from github/pelican

fix an exception not correctly reporting if the locale is not set

This commit is contained in:
Russ Webber 2013-07-18 09:44:46 +08:00
commit 3445066b11

View file

@ -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)