[oe-commits] [openembedded-core] 27/30: oeqa/selftest/context: Replace deprecated imp module usage
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 6 10:52:31 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch thud-next
in repository openembedded-core.
commit 1e7bbdaf78fd2a75d03c6a0c48afed13fffd4397
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Nov 14 11:32:49 2018 +0000
oeqa/selftest/context: Replace deprecated imp module usage
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)
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 fd9280f..84878ea 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
@@ -183,7 +183,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()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list