From 18ded9335b65d1fb64663f7c4dc65108276a9a8a Mon Sep 17 00:00:00 2001 From: Spyros Argyropoulos <spyridon.argyropoulos@cern.ch> Date: Wed, 20 Apr 2022 22:08:37 +0200 Subject: [PATCH] Fix bug in locale setting that breaks logParser running in CI --- scripts/logParser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/logParser.py b/scripts/logParser.py index 123948e6e1..1d8e2f1f65 100644 --- a/scripts/logParser.py +++ b/scripts/logParser.py @@ -4,7 +4,8 @@ import optparse, sys, math, subprocess, os, re, glob, locale from collections import OrderedDict # Set locale to utf8 -locale.setlocale(locale.LC_CTYPE, 'en_US.UTF-8') +lang=os.getenv("LC_CTYPE").split(".")[0] if os.getenv("LC_CTYPE") else "C" +locale.setlocale(locale.LC_CTYPE, f'{lang}.UTF-8') # This might be needed when running logParser in standalone mode sys.path.append("/cvmfs/atlas.cern.ch/repo/sw/Generators/MCJobOptions/scripts") -- GitLab