c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #16034
[Bug 716715] Re: [trunk 3353] db_user parameter dont work
** Changed in: openobject-server
Importance: Undecided => Low
** Changed in: openobject-server
Status: New => Confirmed
** Changed in: openobject-server
Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/716715
Title:
[trunk 3353] db_user parameter dont work
Status in OpenERP Server:
Confirmed
Bug description:
in sql_db.py
_dsn = ''
for p in ('host', 'port', 'user', 'password'):
cfg = tools.config['db_' + p]
if cfg:
_dsn += '%s=%s ' % (p, cfg)
def dsn(db_name):
return '%sdbname=%s' % (_dsn, db_name)
_dns set when module is import, before config file and parameter read,
and never reset after, so on my test _dns = user:user of the ubuntu
session
to solve the problem i do
def dsn(db_name):
return 'user=%s dbname=%s' % (tools.config['db_user'], db_name)
take the true user from the config
good luck with this bug, it give me a headache
References