[oe-commits] [openembedded-core] 22/32: oeqa/selftest/context: Replace deprecated imp module usage

git at git.openembedded.org git at git.openembedded.org
Thu Dec 6 10:51:53 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit 351a7b75959593922909d7e1929a6429a2bf94a7
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 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()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list