Accepted Uppercase DB names and displayed on terminal
bzr revid: jvo@tinyerp.com-20080911072945-jwo9wscd8ko66av9
This commit is contained in:
parent
619e95b4aa
commit
e26e2062b5
|
@ -44,7 +44,7 @@ def get_db_and_pool(db_name, force_demo=False, status=None, update_module=False)
|
|||
db = db_dic[db_name]
|
||||
else:
|
||||
logger = netsvc.Logger()
|
||||
logger.notifyChannel('pooler', netsvc.LOG_INFO, 'Connecting to %s' % (db_name))
|
||||
logger.notifyChannel('pooler', netsvc.LOG_INFO, 'Connecting to %s' % (db_name.lower()))
|
||||
db = sql_db.db_connect(db_name)
|
||||
db_dic[db_name] = db
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class db(netsvc.Service):
|
|||
cr.close()
|
||||
logger = netsvc.Logger()
|
||||
logger.notifyChannel("web-services", netsvc.LOG_INFO,
|
||||
'CREATE DB: %s' % (db_name))
|
||||
'CREATE DB: %s' % (db_name.lower()))
|
||||
dbi = DBInitialize()
|
||||
create_thread = threading.Thread(target=dbi,
|
||||
args=(self, id, db_name, demo, lang, user_password))
|
||||
|
@ -334,7 +334,7 @@ class common(netsvc.Service):
|
|||
res = security.login(db, login, password)
|
||||
logger = netsvc.Logger()
|
||||
msg = res and 'successful login' or 'bad login or password'
|
||||
logger.notifyChannel("web-service", netsvc.LOG_INFO, "%s from '%s' using database '%s'" % (msg, login, db))
|
||||
logger.notifyChannel("web-service", netsvc.LOG_INFO, "%s from '%s' using database '%s'" % (msg, login, db.lower()))
|
||||
return res or False
|
||||
|
||||
def about(self, extended=False):
|
||||
|
|
Loading…
Reference in New Issue