From 5c3d2edf3b96718f867e24d38f7810cb0d4a2192 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 14 Jul 2013 15:50:23 -0500 Subject: [PATCH] moved the locals restoring logic, thanks ozancag --- VERSION | 2 +- gluon/main.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index a31d7138..f4a7f919 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.14.06.05.02 +Version 2.6.0-development+timestamp.2013.07.14.15.49.31 diff --git a/gluon/main.py b/gluon/main.py index 470468fe..30316c14 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -29,8 +29,6 @@ import tempfile import random import string import urllib2 -import locale -locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C" try: import simplejson as sj #external installed library @@ -74,8 +72,13 @@ import logging.config # This needed to prevent exception on Python 2.5: # NameError: name 'gluon' is not defined # See http://bugs.python.org/issue1436 + +# attention!, the import Tkinter in messageboxhandler, changes locale ... import gluon.messageboxhandler logging.gluon = gluon +# so we must restore it! Thanks ozancag +import locale +locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C" exists = os.path.exists pjoin = os.path.join