Python 3 deprecated the logger.warn method in favor of warning

Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning, so we
prefer to use warning to avoid DeprecationWarning.

Closes-Bug: #1529913

Change-Id: I5d6d85b1ee4a63ebfb3348c093e37ab48b713e40
This commit is contained in:
LiuNanke
2015-12-29 11:53:12 +08:00
parent 4d7a594a1c
commit d49a78e9f8
5 changed files with 15 additions and 15 deletions

View File

@@ -54,7 +54,7 @@ def acquire_port(host):
ALLOCATED_PORTS.add((host, port))
return port
except exception.SocketPortInUseException as e:
LOG.warn(e.format_message())
LOG.warning(e.format_message())
raise exception.SocketPortRangeExhaustedException(host=host)