diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index 6a7952171..65e39c5cb 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -2046,9 +2046,9 @@ def check_file_for_enabled_service(env_file): for service in constants.DEPRECATED_SERVICES.keys(): try: if content["resource_registry"][service] != "OS::Heat::None": - LOG.warn("service " + service + " is enabled in " - + str(env_file) + ". " + - constants.DEPRECATED_SERVICES[service]) + LOG.warning("service " + service + " is enabled in " + + str(env_file) + ". " + + constants.DEPRECATED_SERVICES[service]) deprecated_services_enabled.append(service) except (KeyError, TypeError) as e: # ignore if content["resource_registry"] is empty diff --git a/tripleoclient/v1/container_image.py b/tripleoclient/v1/container_image.py index db0652024..4c76667a0 100644 --- a/tripleoclient/v1/container_image.py +++ b/tripleoclient/v1/container_image.py @@ -455,7 +455,8 @@ class PrepareImageFiles(command.Command): if parsed_args.output_env_file: params = prepare_data[parsed_args.output_env_file] if os.path.exists(parsed_args.output_env_file): - self.log.warn("Output env file exists, moving it to backup.") + self.log.warning("Output env file exists, \ + moving it to backup.") shutil.move(parsed_args.output_env_file, parsed_args.output_env_file + ".backup") with os.fdopen(os.open(parsed_args.output_env_file, @@ -723,7 +724,8 @@ class TripleOImagePrepareDefault(command.Command): self.app.stdout.write(env_data) if parsed_args.output_env_file: if os.path.exists(parsed_args.output_env_file): - self.log.warn("Output env file exists, moving it to backup.") + self.log.warning("Output env file exists, \ + moving it to backup.") shutil.move(parsed_args.output_env_file, parsed_args.output_env_file + ".backup") with os.fdopen(os.open(parsed_args.output_env_file, @@ -822,7 +824,8 @@ class TripleOImagePrepare(command.Command): env_data = build_env_file(params, self.app.command_options) if parsed_args.output_env_file: if os.path.exists(parsed_args.output_env_file): - self.log.warn("Output env file exists, moving it to backup.") + self.log.warning("Output env file exists, \ + moving it to backup.") shutil.move(parsed_args.output_env_file, parsed_args.output_env_file + ".backup") with os.fdopen(os.open(parsed_args.output_env_file, diff --git a/tripleoclient/v1/overcloud_image.py b/tripleoclient/v1/overcloud_image.py index 1604684be..b9651e8bf 100644 --- a/tripleoclient/v1/overcloud_image.py +++ b/tripleoclient/v1/overcloud_image.py @@ -238,9 +238,9 @@ class UploadOvercloudImage(command.Command): def _get_environment_var(self, envvar, default, deprecated=[]): for env_key in deprecated: if env_key in os.environ: - self.log.warn(('Found deprecated environment var \'%s\', ' - 'please use \'%s\' instead' % (env_key, - envvar))) + self.log.warning(('Found deprecated environment var \'%s\', ' + 'please use \'%s\' instead' % (env_key, + envvar))) return os.environ.get(env_key) return os.environ.get(envvar, default)