[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()
|
cr.commit()
|
||||||
except Exception:
|
except Exception:
|
||||||
cr.rollback()
|
cr.rollback()
|
||||||
_logger.warn(
|
_logger.warning(
|
||||||
'Could not delete obsolete record with id: %d of model %s\n'
|
'Could not delete obsolete record with id: %d of model %s\n'
|
||||||
'There should be some relation that points to this resource\n'
|
'There should be some relation that points to this resource\n'
|
||||||
'You should manually fix this and restart with --update=module',
|
'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):
|
def check(self, cr, uid, ids, context=None):
|
||||||
for mod in self.browse(cr, uid, ids, context=context):
|
for mod in self.browse(cr, uid, ids, context=context):
|
||||||
if not mod.description:
|
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():
|
if not mod.certificate or not mod.certificate.isdigit():
|
||||||
_logger.info('module %s: no quality certificate', mod.name)
|
_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):
|
def execute(self, cr, uid, ids, context=None):
|
||||||
_logger.warn(DEPRECATION_MESSAGE)
|
_logger.warning(DEPRECATION_MESSAGE)
|
||||||
|
|
||||||
ir_actions_configuration_wizard()
|
ir_actions_configuration_wizard()
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ class browse_record(object):
|
||||||
return attr
|
return attr
|
||||||
else:
|
else:
|
||||||
error_msg = "Field '%s' does not exist in object '%s'" % (name, self)
|
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)
|
raise KeyError(error_msg)
|
||||||
|
|
||||||
# if the field is a classic one or a many2one, we'll fetch all classic and many2one fields
|
# 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
|
msg += "Cursor was created at %s:%s" % self.__caller
|
||||||
else:
|
else:
|
||||||
msg += "Please enable sql debugging to trace the caller."
|
msg += "Please enable sql debugging to trace the caller."
|
||||||
_logger.warn(msg)
|
_logger.warning(msg)
|
||||||
self._close(True)
|
self._close(True)
|
||||||
|
|
||||||
@check
|
@check
|
||||||
def execute(self, query, params=None, log_exceptions=None):
|
def execute(self, query, params=None, log_exceptions=None):
|
||||||
if '%d' in query or '%f' in query:
|
if '%d' in query or '%f' in query:
|
||||||
_logger.warn(query)
|
_logger.warning(query)
|
||||||
_logger.warn("SQL queries cannot contain %d or %f anymore. "
|
_logger.warning("SQL queries cannot contain %d or %f anymore. "
|
||||||
"Use only %s")
|
"Use only %s")
|
||||||
|
|
||||||
if self.sql_log:
|
if self.sql_log:
|
||||||
|
@ -396,7 +396,7 @@ class ConnectionPool(object):
|
||||||
delattr(cnx, 'leaked')
|
delattr(cnx, 'leaked')
|
||||||
self._connections.pop(i)
|
self._connections.pop(i)
|
||||||
self._connections.append((cnx, False))
|
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):
|
for i, (cnx, used) in enumerate(self._connections):
|
||||||
if not used and dsn_are_equals(cnx.dsn, dsn):
|
if not used and dsn_are_equals(cnx.dsn, dsn):
|
||||||
|
|
Loading…
Reference in New Issue