[OE-core] [PATCH] scripts/oe-selftest: avoid deprecated imp.reload function

Leonardo Sandoval leonardo.sandoval.gonzalez at linux.intel.com
Thu May 4 17:26:43 UTC 2017


On Thu, 2017-05-04 at 17:41 +0100, Burton, Ross wrote:
> 
> On 2 May 2017 at 18:37, <leonardo.sandoval.gonzalez at linux.intel.com>
> wrote:
>         As explained in [1], the module function imp.reload has been
>         deprecated for
>         importlib.reload, so use the latter instead.
>         
> 
> $ oe-selftest -r package
> 2017-05-04 17:40:10,352 - selftest - INFO - Running bitbake -e to get
> BBPATH
> Traceback (most recent call last):
>   File "/home/ross/Yocto/poky/scripts/oe-selftest", line 806, in
> <module>
>     ret = main()
>   File "/home/ross/Yocto/poky/scripts/oe-selftest", line 500, in main
>     importlib.reload(oeqa.selftest)
> UnboundLocalError: local variable 'importlib' referenced before
> assignment
> 
I saw the error also. The strange thing is that the import importlib has
global scope but the interpreter does not have it visible at the 'main'
function. any idea? will send a v2 once I figure out the latter.

Leo

> 
> Ross





More information about the Openembedded-core mailing list