← Back to team overview

credativ team mailing list archive

[Bug 911603] [NEW] Rev 3861 refactoring breaks module load

 

Public bug reported:

Rev 3861 includes changes to modules/module.py which make the code
'clearer and simpler' but actually break module installation.

At modules/module.py:262 tools.file_open() returns a cStringIO.StringO,
which does not support the `with` protocol in python-2.x.

This produces the following failure when trying to install a module:

  [---snip stacktrace---]
  File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 262, in load_information_from_description_file
    with tools.file_open(terp_file) as terp_f:
AttributeError: __exit__

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/911603

Title:
  Rev 3861 refactoring breaks module load

Status in OpenERP Server:
  New

Bug description:
  Rev 3861 includes changes to modules/module.py which make the code
  'clearer and simpler' but actually break module installation.

  At modules/module.py:262 tools.file_open() returns a
  cStringIO.StringO, which does not support the `with` protocol in
  python-2.x.

  This produces the following failure when trying to install a module:

    [---snip stacktrace---]
    File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 262, in load_information_from_description_file
      with tools.file_open(terp_file) as terp_f:
  AttributeError: __exit__

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/911603/+subscriptions


Follow ups

References