[FIX] Remove the password for the dump and the restore of database

bzr revid: stephane@tinyerp.com-20081125112522-iglichvetklo3hyv
This commit is contained in:
Stephane Wirtel 2008-11-25 12:25:22 +01:00
parent 008c0f0ee9
commit be08323c62
1 changed files with 0 additions and 10 deletions

View File

@ -163,11 +163,6 @@ class db(netsvc.Service):
security.check_super(password)
logger = netsvc.Logger()
if tools.config['db_password']:
logger.notifyChannel("web-service", netsvc.LOG_ERROR,
'DUMP DB: %s doesn\'t work with password' % (db_name,))
raise Exception, "Couldn't dump database with password"
cmd = ['pg_dump', '--format=c']
if tools.config['db_user']:
cmd.append('--username=' + tools.config['db_user'])
@ -198,11 +193,6 @@ class db(netsvc.Service):
'RESTORE DB: %s already exists' % (db_name,))
raise Exception, "Database already exists"
if tools.config['db_password']:
logger.notifyChannel("web-service", netsvc.LOG_ERROR,
'RESTORE DB: %s doesn\'t work with password' % (db_name,))
raise Exception, "Couldn't restore database with password"
db = sql_db.db_connect('template1', serialize=1)
db.truedb.autocommit()
cr = db.cursor()