← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 716715] [NEW] [trunk 3353] db_user parameter dont work

 

Public bug reported:

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

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
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:
  New

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





Follow ups

References