Fix DeprecationWarning for using logger.warn

The logger.warn method is deprecated, use warning instead.

https://docs.python.org/3.6/library/logging.html#logging.warning

Change-Id: Id20ce8011aa0ac901a138132f7b1932c601e19ab
Story: 2006330
Task: 36070
This commit is contained in:
Matt Riedemann 2019-08-02 14:15:59 -04:00
parent 7f2ca8179e
commit 799bd0a773
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ def from_conf(conf, session=None, **kwargs):
"for project '{project}' (service type "
"'{service_type}'): {exception}".format(
project=project_name, service_type=st, exception=e))
_logger.warn("Disabling service '{service_type}': {reason}".format(
service_type=st, reason=reason))
_logger.warning("Disabling service '{service_type}': "
"{reason}".format(service_type=st, reason=reason))
_disable_service(config_dict, st, reason=reason)
continue
# Load them into config_dict under keys prefixed by ${service_type}_