##// END OF EJS Templates
locale: use a hacky way to catch the locale set error. We rather "cleanup" the env ourselfs...
marcink -
r507:84e9d5ef default
parent child Browse files
Show More
@@ -32,6 +32,20 b' from pyramid.settings import asbool, asl'
32 32 from pyramid.wsgi import wsgiapp
33 33 from pyramid.compat import configparser
34 34
35
36 log = logging.getLogger(__name__)
37
38 # due to Mercurial/glibc2.27 problems we need to detect if locale settings are
39 # causing problems and "fix" it in case they do and fallback to LC_ALL = C
40
41 try:
42 locale.setlocale(locale.LC_ALL, '')
43 except locale.Error as e:
44 log.error(
45 'LOCALE ERROR: failed to set LC_ALL, fallback to LC_ALL=C, org error: %s', e)
46 os.environ['LC_ALL'] = 'C'
47
48
35 49 from vcsserver import remote_wsgi, scm_app, settings, hgpatches
36 50 from vcsserver.git_lfs.app import GIT_LFS_CONTENT_TYPE, GIT_LFS_PROTO_PAT
37 51 from vcsserver.echo_stub import remote_wsgi as remote_wsgi_stub
@@ -58,7 +72,7 b' except ImportError:'
58 72 SubversionFactory = None
59 73 SvnRemote = None
60 74
61 log = logging.getLogger(__name__)
75
62 76
63 77
64 78 def _is_request_chunked(environ):
General Comments 0
You need to be logged in to leave comments. Login now