[FIX] in load_information_from_description_file, f can be a StringIO (in case of zipped module) and StringIO are not contextmanagers.
So rollback the context management thingie bzr revid: xmo@openerp.com-20120202154532-tq9x07ujf0bn9mcp
This commit is contained in:
parent
aea1b13412
commit
df8af0ec4a
|
@ -332,7 +332,6 @@ def load_information_from_description_file(module):
|
||||||
'description': '',
|
'description': '',
|
||||||
'icon': get_module_icon(module),
|
'icon': get_module_icon(module),
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': False,
|
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'name': False,
|
'name': False,
|
||||||
'post_load': None,
|
'post_load': None,
|
||||||
|
@ -345,8 +344,11 @@ def load_information_from_description_file(module):
|
||||||
'depends data demo test init_xml update_xml demo_xml'.split(),
|
'depends data demo test init_xml update_xml demo_xml'.split(),
|
||||||
iter(list, None)))
|
iter(list, None)))
|
||||||
|
|
||||||
with tools.file_open(terp_file) as terp_f:
|
f = tools.file_open(terp_file)
|
||||||
info.update(eval(terp_f.read()))
|
try:
|
||||||
|
info.update(eval(f.read()))
|
||||||
|
finally:
|
||||||
|
f.close()
|
||||||
|
|
||||||
if 'active' in info:
|
if 'active' in info:
|
||||||
# 'active' has been renamed 'auto_install'
|
# 'active' has been renamed 'auto_install'
|
||||||
|
|
Loading…
Reference in New Issue