Replace deprecated warn method

The warn method of logger instances has been deprecated. Use warning
instead.

Change-Id: I92eadc3ca9103d33e8b3fee619658e6419addc25
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-12-17 00:04:58 +09:00
parent 7f29ba5f28
commit d7d1b4f0cf
3 changed files with 11 additions and 11 deletions

View File

@@ -175,23 +175,23 @@ class ExecutorConductor(base.Conductor, metaclass=abc.ABCMeta):
consume = False
if self._log.isEnabledFor(logging.WARNING):
if consume:
self._log.warn(
self._log.warning(
"Job execution failed (consumption being"
" skipped): %s [%s failures]", job, len(e))
else:
self._log.warn(
self._log.warning(
"Job execution failed (consumption"
" proceeding): %s [%s failures]", job, len(e))
# Show the failure/s + traceback (if possible)...
for i, f in enumerate(e):
self._log.warn("%s. %s", i + 1,
f.pformat(traceback=True))
self._log.warning("%s. %s", i + 1,
f.pformat(traceback=True))
except self.NO_CONSUME_EXCEPTIONS:
self._log.warn("Job execution failed (consumption being"
" skipped): %s", job, exc_info=True)
self._log.warning("Job execution failed (consumption being"
" skipped): %s", job, exc_info=True)
consume = False
except Exception:
self._log.warn(
self._log.warning(
"Job execution failed (consumption proceeding): %s",
job, exc_info=True)
else:

View File

@@ -383,8 +383,8 @@ class Request(Message):
try:
moved = self.transition(new_state)
except excp.InvalidState:
logger.warn("Failed to transition '%s' to %s state.", self,
new_state, exc_info=True)
logger.warnng("Failed to transition '%s' to %s state.", self,
new_state, exc_info=True)
return moved
@fasteners.locked

View File

@@ -328,8 +328,8 @@ class JobBoardIterator:
if maybe_job.state in allowed_states:
job = maybe_job
except excp.JobFailure:
self._logger.warn("Failed determining the state of"
" job '%s'", maybe_job, exc_info=True)
self._logger.warning("Failed determining the state of"
" job '%s'", maybe_job, exc_info=True)
except excp.NotFound:
# Attempt to clean this off the board now that we found
# it wasn't really there (this **must** gracefully handle