[GRASS-SVN] r68884 - grass/branches/releasebranch_7_2/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 7 08:26:54 PDT 2016
Author: neteler
Date: 2016-07-07 08:26:54 -0700 (Thu, 07 Jul 2016)
New Revision: 68884
Modified:
grass/branches/releasebranch_7_2/lib/init/grass.py
Log:
grass.py: fall back to C locale rather than refusing to start at all (see: https://lists.osgeo.org/pipermail/grass-user/2015-April/072331.html + https://lists.osgeo.org/pipermail/grass-user/2016-July/074488.html) (trunk, r68883)
Modified: grass/branches/releasebranch_7_2/lib/init/grass.py
===================================================================
--- grass/branches/releasebranch_7_2/lib/init/grass.py 2016-07-07 15:21:01 UTC (rev 68883)
+++ grass/branches/releasebranch_7_2/lib/init/grass.py 2016-07-07 15:26:54 UTC (rev 68884)
@@ -1108,10 +1108,12 @@
# If we get here, system locale settings are terribly wrong
# There is no point to continue as GRASS/Python will fail
# in some other unpredictable way.
- print("System locale is not usable. "
+ print("System locale is not usable (LC_ALL variable not defined). "
"It indicates misconfigured environment.")
print("Reported error message: %s" % e)
- sys.exit("Fix system locale settings and then try again.")
+ ## TOO DRASTIC: sys.exit("Fix system locale settings and then try again.")
+ locale.setlocale(locale.LC_ALL, 'C')
+ warning(_("Default locale settings are missing. GRASS running with C locale."))
language, encoding = locale.getdefaultlocale()
if not language:
More information about the grass-commit
mailing list