summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create_npm.py
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-07-19 13:47:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-25 15:01:21 +0100
commit8c7ca97dd6fe790453dee2d245db0594e58c6fbf (patch)
tree1c73877dcef05681e95162cfcbaf29a9475cf194 /scripts/lib/recipetool/create_npm.py
parent8dcc23b5cc1d206a74d554ae57a8c1c20358cc03 (diff)
downloadpoky-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/recipetool/create_npm.py')
-rw-r--r--scripts/lib/recipetool/create_npm.py6
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')