moved the locals restoring logic, thanks ozancag
This commit is contained in:
@@ -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
|
||||||
|
|||||||
+5
-2
@@ -29,8 +29,6 @@ import tempfile
|
|||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
import urllib2
|
import urllib2
|
||||||
import locale
|
|
||||||
locale.setlocale(locale.LC_CTYPE, "C") # IMPORTANT, web2py requires locale "C"
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import simplejson as sj #external installed library
|
import simplejson as sj #external installed library
|
||||||
@@ -74,8 +72,13 @@ import logging.config
|
|||||||
# This needed to prevent exception on Python 2.5:
|
# This needed to prevent exception on Python 2.5:
|
||||||
# NameError: name 'gluon' is not defined
|
# NameError: name 'gluon' is not defined
|
||||||
# See http://bugs.python.org/issue1436
|
# See http://bugs.python.org/issue1436
|
||||||
|
|
||||||
|
# attention!, the import Tkinter in messageboxhandler, changes locale ...
|
||||||
import gluon.messageboxhandler
|
import gluon.messageboxhandler
|
||||||
logging.gluon = gluon
|
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
|
exists = os.path.exists
|
||||||
pjoin = os.path.join
|
pjoin = os.path.join
|
||||||
|
|||||||
Reference in New Issue
Block a user