Permalink
Browse files

Merge pull request #94 from quiver/fix-locale-setting

When locale is not initialized, skip setlocale
  • Loading branch information...
mooz committed Apr 9, 2018
2 parents aaae4c1 + 11c8c1b commit dac03893830c6b638a6292295580007fad7cdf17
Showing with 4 additions and 1 deletion.
  1. +4 −1 percol/cli.py
View
@@ -119,7 +119,10 @@ def setup_options(parser):
help = "exit immediately with doing nothing to cache module files and speed up start-up time")
def set_proper_locale(options):
locale.setlocale(locale.LC_ALL, '')
try:
locale.setlocale(locale.LC_ALL, '')
except Exception as e:
debug.log("Exception in setlocale", e)
output_encoding = locale.getpreferredencoding()
if options.output_encoding:
output_encoding = options.output_encoding

0 comments on commit dac0389

Please sign in to comment.