fixed logging issue (807), thanks Marc

This commit is contained in:
Massimo DiPierro
2012-05-19 10:07:56 -05:00
parent 2d48af247d
commit 6775f89c2e
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-05-17 18:13:53) dev
Version 2.00.0 (2012-05-19 10:07:52) dev
+7
View File
@@ -68,6 +68,13 @@ create_missing_folders()
# set up logging for subsequent imports
import logging
import logging.config
# This needed to prevent exception on Python 2.5:
# NameError: name 'gluon' is not defined
# See http://bugs.python.org/issue1436
import gluon.messageboxhandler
logging.gluon = gluon
logpath = abspath("logging.conf")
if os.path.exists(logpath):
logging.config.fileConfig(abspath("logging.conf"))
+4 -1
View File
@@ -1016,13 +1016,16 @@ class MapUrlIn(object):
self.request.args = self.args
if self.language:
self.request.uri_language = self.language
uri = '/%s/%s/%s' % (self.application, self.controller, self.function)
uri = '/%s/%s' % (self.controller, self.function)
app = self.application
if self.map_hyphen:
uri = uri.replace('_', '-')
app = app.replace('_', '-')
if self.extension != 'html':
uri += '.' + self.extension
if self.language:
uri = '/%s%s' % (self.language, uri)
uri = '/%s%s' % (app, uri)
uri += self.args and urllib.quote('/' + '/'.join([str(x) for x in self.args])) or ''
uri += (self.query and ('?' + self.query) or '')
self.env['REQUEST_URI'] = uri