Merge branch 'master' of github.com:webnotes/wnframework

This commit is contained in:
Rushabh Mehta 2011-11-08 12:57:59 +05:30
commit 5c932fd8d9
2 changed files with 4 additions and 3 deletions

View file

@ -26,7 +26,7 @@ class Database:
self.transaction_writes = 0
self.testing_tables = []
self.password = self.get_db_password(user, password)
self.password = self.get_db_password(self.user, password)
self.connect()
if self.user != 'root':

View file

@ -18,8 +18,9 @@ def run(patch_list, overwrite = 0, log_exception=1, conn = '', db_name = '', db_
# db connection
if not conn:
connect_db(db_name or webnotes.defs.default_db_name, \
db_password or webnotes.defs.db_password)
dbn = db_name or webnotes.defs.default_db_name
pwd = db_password or (hasattr(webnotes.defs, 'get_db_password') and webnotes.defs.get_db_password(dbn)) or (hasattr(webnotes.defs, 'db_password') and webnotes.defs.db_password)
connect_db(dbn, pwd)
else:
webnotes.conn = conn