From 3445066b11ef1123f3a32bb6b87fac5bfe3be293 Mon Sep 17 00:00:00 2001 From: Russ Webber Date: Thu, 18 Jul 2013 09:44:46 +0800 Subject: [PATCH] fix an exception not correctly reporting if the locale is not set --- pelican/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 53216421..a9aa916c 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -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)