diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-14 11:32:49 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 11:46:07 +0000 |
commit | 3e9505274bfc96a3d10003c0ebd5d4918d734487 (patch) | |
tree | baf39e0a0b87183f8fa267757b56948f6ca14cbb /meta/lib/oeqa | |
parent | f0275761931d976835da636eac16755b97f239f9 (diff) | |
download | poky-3e9505274bfc96a3d10003c0ebd5d4918d734487.tar.gz |
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@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/context.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 302ff73bed..4509e0f63d 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -5,7 +5,7 @@ import os | |||
5 | import time | 5 | import time |
6 | import glob | 6 | import glob |
7 | import sys | 7 | import sys |
8 | import imp | 8 | import importlib |
9 | import signal | 9 | import signal |
10 | from shutil import copyfile | 10 | from shutil import copyfile |
11 | from random import choice | 11 | from random import choice |
@@ -178,7 +178,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
178 | self.tc.logger.info("\t%s" % l) | 178 | self.tc.logger.info("\t%s" % l) |
179 | 179 | ||
180 | sys.path.extend(layer_libdirs) | 180 | sys.path.extend(layer_libdirs) |
181 | imp.reload(oeqa.selftest) | 181 | importlib.reload(oeqa.selftest) |
182 | 182 | ||
183 | _check_required_env_variables(["BUILDDIR"]) | 183 | _check_required_env_variables(["BUILDDIR"]) |
184 | _check_presence_meta_selftest() | 184 | _check_presence_meta_selftest() |