mirror of
https://github.com/lutris/lutris
synced 2024-10-04 14:59:37 +00:00
Catch errors when using an unsupported locale
This commit is contained in:
parent
c47a66a81a
commit
c332fc8d03
|
@ -24,7 +24,11 @@ if LAUNCH_PATH != "/usr/bin":
|
|||
SOURCE_PATH = normpath(os.path.join(LAUNCH_PATH, '..'))
|
||||
sys.path.insert(0, SOURCE_PATH)
|
||||
|
||||
locale.setlocale(locale.LC_ALL, locale.getlocale())
|
||||
try:
|
||||
locale_name = locale.getlocale()
|
||||
locale.setlocale(locale.LC_ALL, locale_name)
|
||||
except locale.Error:
|
||||
sys.stderr.write("Unsupported locale %s\n" % locale_name)
|
||||
|
||||
from lutris.gui.application import Application
|
||||
|
||||
|
|
Loading…
Reference in a new issue