[7.0] missing arguments to logging statement in workers.py

Bug #1305653 reported by Alexandre Fayolle - camptocamp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Undecided
Unassigned
OpenERP Community Backports (Server)
Status tracked in 7.0
7.0
Fix Released
Undecided
Alexandre Fayolle - camptocamp

Bug Description

in openerp/services/workers.py:

       def time_expired(n, stack):
            _logger.info('Worker (%d) CPU time limit (%s) reached.', config['limit_time_cpu'])

There is a missing parameter, which cause a stack trace in the logging module:

Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/home/afayolle/work/customers/avosdim/buildout/parts/server/openerp/netsvc.py", line 150, in format
    logging.exception('while formatting %r', record)
  File "/home/afayolle/work/customers/avosdim/buildout/parts/server/openerp/netsvc.py", line 144, in format
    try:
  File "/usr/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string

Related branches

Changed in openobject-server:
assignee: nobody → Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c)
assignee: Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) → nobody
Changed in openobject-server:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.