All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/oe-selftest: avoid deprecated imp.reload function
@ 2017-05-02 17:37 leonardo.sandoval.gonzalez
  2017-05-04 16:41 ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: leonardo.sandoval.gonzalez @ 2017-05-02 17:37 UTC (permalink / raw)
  To: openembedded-core

From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>

As explained in [1], the module function imp.reload has been deprecated for
importlib.reload, so use the latter instead.

[1] https://docs.python.org/3/library/imp.html#imp.reload

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
 scripts/oe-selftest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 52366b1c8de..bbc161e649b 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -35,7 +35,7 @@ import time as t
 import re
 import fnmatch
 import collections
-import imp
+import importlib
 
 sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
 import scriptpath
@@ -497,7 +497,7 @@ def main():
     bbpath = get_bb_var('BBPATH').split(':')
     layer_libdirs = [p for p in (os.path.join(l, 'lib') for l in bbpath) if os.path.exists(p)]
     sys.path.extend(layer_libdirs)
-    imp.reload(oeqa.selftest)
+    importlib.reload(oeqa.selftest)
 
     # act like bitbake and enforce en_US.UTF-8 locale
     os.environ["LC_ALL"] = "en_US.UTF-8"
-- 
2.12.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-05  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-02 17:37 [PATCH] scripts/oe-selftest: avoid deprecated imp.reload function leonardo.sandoval.gonzalez
2017-05-04 16:41 ` Burton, Ross
2017-05-04 17:26   ` Leonardo Sandoval
2017-05-05  9:57     ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.