[OE-core] [PATCH 22/45] oeqa/selftest/context: Replace deprecated imp module usage
Armin Kuster
akuster808 at gmail.com
Thu Dec 13 21:38:30 UTC 2018
From: Richard Purdie <richard.purdie at linuxfoundation.org>
Avoid the warning:
meta/lib/oeqa/selftest/context.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
In this case importlib is a direct replacement.
(From OE-Core rev: db7a60c36a2d3eefc61ae6e1ede01680dc932035)
(From OE-Core rev: 351a7b75959593922909d7e1929a6429a2bf94a7)
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/context.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 9e90d3c..cac049f 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -5,7 +5,7 @@ import os
import time
import glob
import sys
-import imp
+import importlib
import signal
from shutil import copyfile
from random import choice
@@ -174,7 +174,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
self.tc.logger.info("\t%s" % l)
sys.path.extend(layer_libdirs)
- imp.reload(oeqa.selftest)
+ importlib.reload(oeqa.selftest)
_check_required_env_variables(["BUILDDIR"])
_check_presence_meta_selftest()
--
2.7.4
More information about the Openembedded-core
mailing list