diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-14 11:32:49 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-16 14:31:33 +0000 |
commit | 0a5b7850e51d80c4d4ca3bcf05dba62179bf65e2 (patch) | |
tree | d409601fa476e4e0d71b830e55e06a4669681698 /meta/lib/oeqa/selftest | |
parent | 01d00cd776b63d8847cad84fc58af576a40601d0 (diff) | |
download | poky-0a5b7850e51d80c4d4ca3bcf05dba62179bf65e2.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)
(From OE-Core rev: 1e7bbdaf78fd2a75d03c6a0c48afed13fffd4397)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-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 fd9280f8a9..84878ea193 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 |
@@ -183,7 +183,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): | |||
183 | self.tc.logger.info("\t%s" % l) | 183 | self.tc.logger.info("\t%s" % l) |
184 | 184 | ||
185 | sys.path.extend(layer_libdirs) | 185 | sys.path.extend(layer_libdirs) |
186 | imp.reload(oeqa.selftest) | 186 | importlib.reload(oeqa.selftest) |
187 | 187 | ||
188 | _check_required_env_variables(["BUILDDIR"]) | 188 | _check_required_env_variables(["BUILDDIR"]) |
189 | _check_presence_meta_selftest() | 189 | _check_presence_meta_selftest() |