← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 703841] Re: v6 ImportError: time

 

Confirmed.
In account_payment there is a YAML test that requires to evaluate time.strftime . While the time module is in the scope of process_eval (in bin/tools/yaml_import.py), it is not allowed by safe_eval. There is already a _strptime allowed module in safe_eval that has 'time' as one of its member. Can we just add time in ALLOWED_MODULES to fix this bug or is it substituted by _strptime on purpose?
Then we could also remove all unnecessary 'import time' found in !python test code.

** Changed in: openobject-addons
       Status: Incomplete => Confirmed

** Project changed: openobject-addons => openobject-server

-- 
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 OpenObject 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