Merge lp://staging/~openerp-dev/openobject-server/6.1-opw-574830-xal into lp://staging/openobject-server/6.1

Proposed by Xavier ALT
Status: Merged
Merged at revision: 4181
Proposed branch: lp://staging/~openerp-dev/openobject-server/6.1-opw-574830-xal
Merge into: lp://staging/openobject-server/6.1
Diff against target: 12 lines (+2/-0)
1 file modified
openerp/tools/config.py (+2/-0)
To merge this branch: bzr merge lp://staging/~openerp-dev/openobject-server/6.1-opw-574830-xal
Reviewer Review Type Date Requested Status
Vo Minh Thu Pending
Review via email: mp+107012@code.staging.launchpad.net

Description of the change

Hi,

In gunicorn.conf.py, setting new config value are not correctly validated.

Example:
   conf['cpu_time_limit'] = '180'

Raising:
2012-05-10 09:11:54,002 14215 ERROR ? gunicorn.error: Error handling request
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/gunicorn/workers/sync.py", line 87, in handle_request
    self.cfg.pre_request(self, req)
  File "/srv/erp-uat.canonical.com/uat/server/openerp/wsgi/core.py", line 505, in pre_request
    resource.setrlimit(resource.RLIMIT_CPU, (cpu_time + config['cpu_time_limit'], hard))
TypeError: unsupported operand type(s) for +: 'float' and 'str'

This MP force type checking like it's done on config file loading.

Cheers,
Xavier

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.