[IMP] don't manually split'n load base.sql, cr.execute has no problem eating a whole file (as far as I can see)

bzr revid: xmo@openerp.com-20100921130657-bkqqyscgzmryhap1
This commit is contained in:
Xavier Morel 2010-09-21 18:36:57 +05:30
parent 47ff957f42
commit 773839ed75
1 changed files with 1 additions and 3 deletions

View File

@ -62,9 +62,7 @@ _logger = logging.getLogger('tools')
def init_db(cr):
import addons
f = addons.get_module_resource('base', 'base.sql')
for line in file_open(f).read().split(';'):
if (len(line)>0) and (not line.isspace()):
cr.execute(line)
cr.execute(file_open(f).read())
cr.commit()
for i in addons.get_modules():