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: Ia87055a5bf51aade370e69921956aee0189304a4
This commit is contained in:
parent
db19b04d7f
commit
eb8d3777ad
|
@ -532,8 +532,8 @@ def get_backup_args():
|
||||||
if log_file:
|
if log_file:
|
||||||
CONF.set_default('log_file', log_file)
|
CONF.set_default('log_file', log_file)
|
||||||
else:
|
else:
|
||||||
LOG.warn("log file cannot be created. Freezer will proceed with "
|
LOG.warning("log file cannot be created. Freezer will proceed with"
|
||||||
"default stdout and stderr")
|
" default stdout and stderr")
|
||||||
|
|
||||||
backup_args = FreezerConfig(defaults)
|
backup_args = FreezerConfig(defaults)
|
||||||
|
|
||||||
|
@ -648,8 +648,8 @@ def get_backup_args():
|
||||||
else:
|
else:
|
||||||
os.environ["tricklecount"] = str(1)
|
os.environ["tricklecount"] = str(1)
|
||||||
else:
|
else:
|
||||||
LOG.warn("Trickle not found. Switching to normal mode without "
|
LOG.warning("Trickle not found. Switching to normal mode without "
|
||||||
"limiting bandwidth")
|
"limiting bandwidth")
|
||||||
if backup_args.config:
|
if backup_args.config:
|
||||||
# remove index tmp_file from backup arguments dict
|
# remove index tmp_file from backup arguments dict
|
||||||
utils.delete_file(conf_file.name)
|
utils.delete_file(conf_file.name)
|
||||||
|
|
|
@ -102,7 +102,7 @@ def freezer_main(backup_args):
|
||||||
utils.delete_file(backup_args.tmp_file)
|
utils.delete_file(backup_args.tmp_file)
|
||||||
|
|
||||||
if process.returncode:
|
if process.returncode:
|
||||||
LOG.warn("Trickle Error: {0}".format(error))
|
LOG.warning("Trickle Error: {0}".format(error))
|
||||||
LOG.info("Switching to work without trickle ...")
|
LOG.info("Switching to work without trickle ...")
|
||||||
return run_job(backup_args, storage)
|
return run_job(backup_args, storage)
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,7 @@ class OSClientManager(object):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception(e)
|
LOG.exception(e)
|
||||||
LOG.warn("Exception getting volume status")
|
LOG.warning("Exception getting volume status")
|
||||||
return volume
|
return volume
|
||||||
|
|
||||||
def make_glance_image(self, image_volume_name, copy_volume):
|
def make_glance_image(self, image_volume_name, copy_volume):
|
||||||
|
@ -264,7 +264,7 @@ class OSClientManager(object):
|
||||||
if image.status in ("killed", "deleted"):
|
if image.status in ("killed", "deleted"):
|
||||||
raise
|
raise
|
||||||
LOG.exception(e)
|
LOG.exception(e)
|
||||||
LOG.warn("Exception getting image status")
|
LOG.warning("Exception getting image status")
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def clean_snapshot(self, snapshot):
|
def clean_snapshot(self, snapshot):
|
||||||
|
|
Loading…
Reference in New Issue