From f467fd277eb77336097cfc0f5f329bdc8d0f70cb Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Thu, 19 Jul 2018 13:47:18 +0800 Subject: logging: use warning instead warn The warn method is deprecated. We should use the documented warning instead. Quoting from the python's official doc: """ Note: There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead. """ Signed-off-by: Chen Qi Signed-off-by: Ross Burton --- scripts/lib/devtool/upgrade.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/lib/devtool/upgrade.py') diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 1dde16641b..202007793b 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -264,7 +264,7 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee if no_patch: patches = oe.recipeutils.get_recipe_patches(crd) if patches: - logger.warn('By user choice, the following patches will NOT be applied to the new source tree:\n %s' % '\n '.join([os.path.basename(patch) for patch in patches])) + logger.warning('By user choice, the following patches will NOT be applied to the new source tree:\n %s' % '\n '.join([os.path.basename(patch) for patch in patches])) else: __run('git checkout devtool-patched -b %s' % branch) skiptag = False @@ -273,9 +273,9 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee except bb.process.ExecutionError as e: skiptag = True if 'conflict' in e.stdout: - logger.warn('Command \'%s\' failed:\n%s\n\nYou will need to resolve conflicts in order to complete the upgrade.' % (e.command, e.stdout.rstrip())) + logger.warning('Command \'%s\' failed:\n%s\n\nYou will need to resolve conflicts in order to complete the upgrade.' % (e.command, e.stdout.rstrip())) else: - logger.warn('Command \'%s\' failed:\n%s' % (e.command, e.stdout)) + logger.warning('Command \'%s\' failed:\n%s' % (e.command, e.stdout)) if not skiptag: if uri.startswith('git://'): suffix = 'new' -- cgit v1.2.3