From 88f6e28e7554909c9f012f93613e537b074e774f Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Sun, 28 Oct 2018 10:41:30 +0000 Subject: [PATCH] Workaround for inability to set locale - fallback to 'C' locale Fixes #355 --- l10n.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/l10n.py b/l10n.py index e5e25ab2..020458d5 100755 --- a/l10n.py +++ b/l10n.py @@ -15,7 +15,11 @@ from traceback import print_exc import __builtin__ import locale -locale.setlocale(locale.LC_ALL, '') +try: + locale.setlocale(locale.LC_ALL, '') +except: + # Locale env variables incorrect or locale package not installed/configured on Linux, mysterious reasons on Windows + print "Can't set locale!" from config import config