← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 703841] Re: v6 ImportError: time

 

The 'time' module is built into any current python distribution, so it is always available for importing and you don't have to add it in setup.py (it won't change anything) .
The trick here is that during a safe_eval call (which is used for some tests) we dynamically forbid the use of all python module (built in or not) except _strptime.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/703841

Title:
  v6 ImportError: time

Status in OpenERP Server:
  Confirmed

Bug description:
  Hi,
  windows vista
  addons rev 4248

  when I install modules with configurator, the configurator don't
  finish all options (without error popup), I have this error in the
  server log :

  [2011-01-17 09:28:40,229][aaaa] INFO:init:module hr_timesheet_sheet: loading test/test_hr_timesheet_sheet.yml
  [2011-01-17 09:28:40,864][aaaa] ERROR:tests.hr_timesheet_sheet:time
  Traceback (most recent call last):
    File "tools\yaml_import.pyo", line 729, in process
    File "tools\yaml_import.pyo", line 742, in _process_node
    File "tools\yaml_import.pyo", line 317, in process_record
    File "tools\yaml_import.pyo", line 330, in _create_record
    File "tools\yaml_import.pyo", line 391, in _eval_field
    File "tools\yaml_import.pyo", line 357, in process_eval
    File "tools\safe_eval.pyo", line 281, in safe_eval
    File "", line 1, in <module>
    File "tools\safe_eval.pyo", line 215, in _import
  ImportError: time
  [2011-01-17 09:28:40,864][aaaa] ERROR:test:Tests failed to execute in module hr_timesheet_sheet
  Traceback (most recent call last):
    File "addons\__init__.pyo", line 670, in load_test
    File "addons\__init__.pyo", line 693, in _load_data
    File "tools\yaml_import.pyo", line 794, in yaml_import
    File "tools\yaml_import.pyo", line 729, in process
    File "tools\yaml_import.pyo", line 742, in _process_node
    File "tools\yaml_import.pyo", line 317, in process_record
    File "tools\yaml_import.pyo", line 330, in _create_record
    File "tools\yaml_import.pyo", line 391, in _eval_field
    File "tools\yaml_import.pyo", line 357, in process_eval
    File "tools\safe_eval.pyo", line 281, in safe_eval
    File "", line 1, in <module>
    File "tools\safe_eval.pyo", line 215, in _import
  ImportError: time

  bye





References