diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-07-19 13:47:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-25 15:01:21 +0100 |
commit | 8c7ca97dd6fe790453dee2d245db0594e58c6fbf (patch) | |
tree | 1c73877dcef05681e95162cfcbaf29a9475cf194 /scripts/lib/devtool/upgrade.py | |
parent | 8dcc23b5cc1d206a74d554ae57a8c1c20358cc03 (diff) | |
download | poky-8c7ca97dd6fe790453dee2d245db0594e58c6fbf.tar.gz |
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.
"""
(From OE-Core rev: cc771aa4b74f222f1bea38b0b50196b2fbc97ab4)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index c3fd866ef6..d652f334bb 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 | |||
264 | if no_patch: | 264 | if no_patch: |
265 | patches = oe.recipeutils.get_recipe_patches(crd) | 265 | patches = oe.recipeutils.get_recipe_patches(crd) |
266 | if patches: | 266 | if patches: |
267 | 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])) | 267 | 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])) |
268 | else: | 268 | else: |
269 | __run('git checkout devtool-patched -b %s' % branch) | 269 | __run('git checkout devtool-patched -b %s' % branch) |
270 | skiptag = False | 270 | skiptag = False |
@@ -273,9 +273,9 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, srcbranch, branch, kee | |||
273 | except bb.process.ExecutionError as e: | 273 | except bb.process.ExecutionError as e: |
274 | skiptag = True | 274 | skiptag = True |
275 | if 'conflict' in e.stdout: | 275 | if 'conflict' in e.stdout: |
276 | 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())) | 276 | 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())) |
277 | else: | 277 | else: |
278 | logger.warn('Command \'%s\' failed:\n%s' % (e.command, e.stdout)) | 278 | logger.warning('Command \'%s\' failed:\n%s' % (e.command, e.stdout)) |
279 | if not skiptag: | 279 | if not skiptag: |
280 | if uri.startswith('git://'): | 280 | if uri.startswith('git://'): |
281 | suffix = 'new' | 281 | suffix = 'new' |