[IMP] logging: _logger.warn() replaced by _logger.warning().
bzr revid: vmt@openerp.com-20120202092634-pylu3098p5c0mays
This commit is contained in:
parent
5341b5f445
commit
1ab6f8883c
|
@ -828,7 +828,7 @@ class ir_model_data(osv.osv):
|
|||
cr.commit()
|
||||
except Exception:
|
||||
cr.rollback()
|
||||
_logger.warn(
|
||||
_logger.warning(
|
||||
'Could not delete obsolete record with id: %d of model %s\n'
|
||||
'There should be some relation that points to this resource\n'
|
||||
'You should manually fix this and restart with --update=module',
|
||||
|
|
|
@ -610,7 +610,7 @@ class module(osv.osv):
|
|||
def check(self, cr, uid, ids, context=None):
|
||||
for mod in self.browse(cr, uid, ids, context=context):
|
||||
if not mod.description:
|
||||
_logger.warn('module %s: description is empty !', mod.name)
|
||||
_logger.warning('module %s: description is empty !', mod.name)
|
||||
|
||||
if not mod.certificate or not mod.certificate.isdigit():
|
||||
_logger.info('module %s: no quality certificate', mod.name)
|
||||
|
|
|
@ -392,7 +392,7 @@ class ir_actions_configuration_wizard(osv.osv_memory):
|
|||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
_logger.warn(DEPRECATION_MESSAGE)
|
||||
_logger.warning(DEPRECATION_MESSAGE)
|
||||
|
||||
ir_actions_configuration_wizard()
|
||||
|
||||
|
|
|
@ -371,7 +371,7 @@ class browse_record(object):
|
|||
return attr
|
||||
else:
|
||||
error_msg = "Field '%s' does not exist in object '%s'" % (name, self)
|
||||
self.__logger.warn(error_msg)
|
||||
self.__logger.warning(error_msg)
|
||||
raise KeyError(error_msg)
|
||||
|
||||
# if the field is a classic one or a many2one, we'll fetch all classic and many2one fields
|
||||
|
|
|
@ -194,14 +194,14 @@ class Cursor(object):
|
|||
msg += "Cursor was created at %s:%s" % self.__caller
|
||||
else:
|
||||
msg += "Please enable sql debugging to trace the caller."
|
||||
_logger.warn(msg)
|
||||
_logger.warning(msg)
|
||||
self._close(True)
|
||||
|
||||
@check
|
||||
def execute(self, query, params=None, log_exceptions=None):
|
||||
if '%d' in query or '%f' in query:
|
||||
_logger.warn(query)
|
||||
_logger.warn("SQL queries cannot contain %d or %f anymore. "
|
||||
_logger.warning(query)
|
||||
_logger.warning("SQL queries cannot contain %d or %f anymore. "
|
||||
"Use only %s")
|
||||
|
||||
if self.sql_log:
|
||||
|
@ -396,7 +396,7 @@ class ConnectionPool(object):
|
|||
delattr(cnx, 'leaked')
|
||||
self._connections.pop(i)
|
||||
self._connections.append((cnx, False))
|
||||
_logger.warn('%r: Free leaked connection to %r', self, cnx.dsn)
|
||||
_logger.warning('%r: Free leaked connection to %r', self, cnx.dsn)
|
||||
|
||||
for i, (cnx, used) in enumerate(self._connections):
|
||||
if not used and dsn_are_equals(cnx.dsn, dsn):
|
||||
|
|
Loading…
Reference in New Issue