Use fallback locale if locale is configured incorrectly (fixes #2341)

This commit is contained in:
Manuel Vögele 2019-10-09 15:19:12 +02:00
parent a136c4cda1
commit fefe47521c

View file

@ -24,7 +24,11 @@ if os.path.isdir(os.path.join(LAUNCH_PATH,"../lutris")):
else:
sys.path.insert(0, os.path.normpath(os.path.join(LAUNCH_PATH, "../lib/lutris")))
locale.setlocale(locale.LC_ALL, "")
try:
locale.setlocale(locale.LC_ALL, "")
except locale.Error:
sys.stderr.write("Unsupported locale setting. Using 'C' as fallback locale.\n")
locale.setlocale(locale.LC_ALL, "C")
from lutris.gui.application import Application