kernel: improve error message in eval of __terp__.py

bzr revid: ced-884efd8437c5284fe283043ba21ae898a912bd90
This commit is contained in:
ced 2007-07-12 15:31:22 +00:00
parent 0faaa63908
commit 194f07b1ec
1 changed files with 5 additions and 1 deletions

View File

@ -136,7 +136,11 @@ def create_graph(module_list, force=[]):
terp_file = opj(ad, module, '__terp__.py')
mod_path = opj(ad, module)
if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path+'.zip'):
info = eval(tools.file_open(terp_file).read())
try:
info = eval(tools.file_open(terp_file).read())
except:
logger.notifyChannel('init', netsvc.LOG_ERROR, 'addon:%s:eval file %s' % (module, terp_file))
raise
if info.get('installable', True):
packages.append((module, info.get('depends', []), info))