Replace LOG.warn with LOG.warning
logging.warn is deprecated in Python 3.[1] [1] https://docs.python.org/3/library/logging.html#logging.warning Change-Id: Ia97380c8b497116d0672857544e0d58b3a9a202b
This commit is contained in:
parent
a6fd008301
commit
9e7e0344b6
|
@ -227,8 +227,8 @@ class TimeTrigger(triggers.BaseTrigger):
|
|||
if operation_id not in self._operation_ids:
|
||||
# Maybe, when traversing this operation_id, it has been
|
||||
# removed by self.unregister_operation
|
||||
LOG.warn("Execuete operation %s which is not exist, "
|
||||
"ignore it", operation_id)
|
||||
LOG.warning("Execute operation %s which is not exist, "
|
||||
"ignore it", operation_id)
|
||||
continue
|
||||
|
||||
now = datetime.utcnow()
|
||||
|
|
|
@ -242,10 +242,9 @@ class ProtectOperation(protection_plugin.Operation):
|
|||
try:
|
||||
self._delete_snapshot(cinder_client, self.snapshot_id)
|
||||
except Exception as e:
|
||||
LOG.warn('Failed deleting snapshot: %(snapshot_id)s. '
|
||||
'Reason: %(reason)s',
|
||||
{'snapshot_id': self.snapshot_id, 'reason': e}
|
||||
)
|
||||
LOG.warning('Failed deleting snapshot: %(snapshot_id)s. '
|
||||
'Reason: %(reason)s',
|
||||
{'snapshot_id': self.snapshot_id, 'reason': e})
|
||||
|
||||
|
||||
class RestoreOperation(protection_plugin.Operation):
|
||||
|
|
Loading…
Reference in New Issue