diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-07-19 13:47:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-26 13:16:40 +0100 |
commit | 869e501544960f638edfe17c9d7500b54d05837e (patch) | |
tree | f6967d2d1648f92fd2ec780b02971e0eb8f4c2e4 /scripts/lib/devtool/upgrade.py | |
parent | 53b50b5d11dfd6f299116edc7254ebc1f29f19e5 (diff) | |
download | poky-869e501544960f638edfe17c9d7500b54d05837e.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: f467fd277eb77336097cfc0f5f329bdc8d0f70cb)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.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 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 | |||
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' |