Fix LOG.warn to LOG.warning

logging.warn is deprecated in Python 3.
https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I599f637c39518076d7182b86aecbc8034076be49
This commit is contained in:
Cao Xuan Hoang 2016-09-26 15:53:58 +07:00
parent 2de6556a80
commit 3cfdbe8fc9
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ class MuranoAgent(service.Service):
LOG.debug('Loading plugin %s', name)
__import__(name)
except Exception:
LOG.warn('Cannot load package %s', name, exc_info=True)
LOG.warning('Cannot load package %s', name, exc_info=True)
pass
def _load(self):
@ -142,7 +142,7 @@ class MuranoAgent(service.Service):
except KeyboardInterrupt:
break
except Exception:
LOG.warn('Communication error', exc_info=True)
LOG.warning('Communication error', exc_info=True)
time.sleep(delay)
delay = min(delay * 1.2, 60)
@ -164,7 +164,7 @@ class MuranoAgent(service.Service):
self._send_result(execution_result)
except ValueError:
LOG.warn('Execution result is not produced')
LOG.warning('Execution result is not produced')
def _verify_plan(self, plan):
plan_format_version = semantic_version.Version(

View File

@ -127,7 +127,7 @@ class FilesManager(object):
else:
mns = ("Error to download the file {0}: {1}".
format(url_file, e.message))
LOG.warn(mns)
LOG.warning(mns)
raise ValueError(mns)
return folder