From abcf40c6f5ef81f555466a1d51a79282f5a48d9c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 16 Aug 2011 09:08:13 +0530 Subject: [PATCH] fixes to install + recent --- cgi-bin/webnotes/install_lib/install.py | 14 +++++++++++--- cgi-bin/webnotes/profile.py | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cgi-bin/webnotes/install_lib/install.py b/cgi-bin/webnotes/install_lib/install.py index c270b2059c..68c9fbd2fa 100755 --- a/cgi-bin/webnotes/install_lib/install.py +++ b/cgi-bin/webnotes/install_lib/install.py @@ -98,9 +98,17 @@ class Installer: webnotes.conn.commit() - # - # main script to create a database from - # + def get_db_password(self, db_name): + """ + Get the db_password by method + """ + import webnotes.defs + if hasattr(webnotes.defs, 'get_db_password'): + return webnotes.defs.get_db_password(db_name) + if hasattr(webnotes.defs, 'db_password'): + return webnotes.defs.db_password + return '' + def import_from_db(self, target, source_path='', password = 'admin', verbose=0): """ a very simplified version, just for the time being..will eventually be deprecated once the framework stabilizes. diff --git a/cgi-bin/webnotes/profile.py b/cgi-bin/webnotes/profile.py index 963dda4090..139243cbbd 100644 --- a/cgi-bin/webnotes/profile.py +++ b/cgi-bin/webnotes/profile.py @@ -196,6 +196,7 @@ class Profile: rd = rdl[i] if rd==new_rd: del rdl[i] + break rdl.append(new_rd) if len(rdl) > 20: