From 04974b2bc1f35e2dfddc63959b821bfbc1f36a71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20CHAZALLET?= Date: Wed, 19 Nov 2014 15:44:56 +0100 Subject: [PATCH] BUGFIX WSGI --- openerp-wsgi.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/openerp-wsgi.py b/openerp-wsgi.py index 26f4e54..25fc7ce 100644 --- a/openerp-wsgi.py +++ b/openerp-wsgi.py @@ -14,7 +14,18 @@ import openerp from os import sep -from os.path import curdir, realpath +from os.path import dirname, realpath +import inspect + + +#>>> import os +#>>> import inspect +#>>> inspect.getfile(os) +#'/usr/lib64/python2.7/os.pyc' +#>>> inspect.getfile(inspect) +#'/usr/lib64/python2.7/inspect.pyc' +#>>> os.path.dirname(inspect.getfile(inspect)) +#'/usr/lib64/python2.7' #---------------------------------------------------------- @@ -29,7 +40,8 @@ conf = openerp.tools.config # Path to the OpenERP Addons repository (comma-separated for # multiple locations) -base_path = realpath(curdir) +#base_path = realpath(dirname(__file__)) +base_path = realpath(dirname(inspect.getfile(inspect.currentframe()))) addons_path_base = sep.join((base_path, "addons")) -- 1.7.10.4