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/recipetool/create_npm.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/recipetool/create_npm.py')
| -rw-r--r-- | scripts/lib/recipetool/create_npm.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py index bb42a5ca5c..03667887fc 100644 --- a/scripts/lib/recipetool/create_npm.py +++ b/scripts/lib/recipetool/create_npm.py | |||
| @@ -90,7 +90,7 @@ class NpmRecipeHandler(RecipeHandler): | |||
| 90 | runenv = dict(os.environ, PATH=d.getVar('PATH')) | 90 | runenv = dict(os.environ, PATH=d.getVar('PATH')) |
| 91 | bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) | 91 | bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) |
| 92 | except bb.process.ExecutionError as e: | 92 | except bb.process.ExecutionError as e: |
| 93 | logger.warn('npm shrinkwrap failed:\n%s' % e.stdout) | 93 | logger.warning('npm shrinkwrap failed:\n%s' % e.stdout) |
| 94 | return | 94 | return |
| 95 | 95 | ||
| 96 | tmpfile = os.path.join(localfilesdir, 'npm-shrinkwrap.json') | 96 | tmpfile = os.path.join(localfilesdir, 'npm-shrinkwrap.json') |
| @@ -107,12 +107,12 @@ class NpmRecipeHandler(RecipeHandler): | |||
| 107 | cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) | 107 | cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) |
| 108 | relockbin = os.path.join(NpmRecipeHandler.lockdownpath, 'node_modules', 'lockdown', 'relock.js') | 108 | relockbin = os.path.join(NpmRecipeHandler.lockdownpath, 'node_modules', 'lockdown', 'relock.js') |
| 109 | if not os.path.exists(relockbin): | 109 | if not os.path.exists(relockbin): |
| 110 | logger.warn('Could not find relock.js within lockdown directory; skipping lockdown') | 110 | logger.warning('Could not find relock.js within lockdown directory; skipping lockdown') |
| 111 | return | 111 | return |
| 112 | try: | 112 | try: |
| 113 | bb.process.run('node %s' % relockbin, cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) | 113 | bb.process.run('node %s' % relockbin, cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True) |
| 114 | except bb.process.ExecutionError as e: | 114 | except bb.process.ExecutionError as e: |
| 115 | logger.warn('lockdown-relock failed:\n%s' % e.stdout) | 115 | logger.warning('lockdown-relock failed:\n%s' % e.stdout) |
| 116 | return | 116 | return |
| 117 | 117 | ||
| 118 | tmpfile = os.path.join(localfilesdir, 'lockdown.json') | 118 | tmpfile = os.path.join(localfilesdir, 'lockdown.json') |
