Call set_locale() at startup

This commit is contained in:
Kovid Goyal 2017-05-13 08:01:20 +05:30
parent 1b336bf864
commit 800291c147
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -3,6 +3,7 @@
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
import argparse
import locale
import os
import sys
import tempfile
@ -30,6 +31,7 @@
from .shaders import GL_VERSION
from .utils import safe_print
defconf = os.path.join(config_dir, 'kitty.conf')
@ -223,6 +225,7 @@ def on_glfw_error(code, msg):
def main():
locale.setlocale(locale.LC_ALL, '')
if os.environ.pop('KITTY_LAUNCHED_BY_LAUNCH_SERVICES',
None) == '1' and getattr(sys, 'frozen', True):
os.chdir(os.path.expanduser('~'))