Comment 9 for bug 1165999

Revision history for this message
Antonio Terceiro (terceiro) wrote : Re: [Bug 1165999] Re: Add fedora image support to LAVA

On Sun, Apr 14, 2013 at 09:59:45PM -0000, Michael Hudson-Doyle wrote:
> Fu Wei <email address hidden> writes:
>
> > File "/srv/lava/.cache<email address hidden>/lava_dispatcher/actions/lava_test_shell.py", line 522, in _copy_runner
> > scripts_to_copy = glob.glob(os.path.join(LAVA_TEST_DIR, 'lava-*'))
> > AttributeError: 'function' object has no attribute 'glob'
> >
> >
> > Can you help me out ?
>
> I've run into this before. It's Python being terrible basically; you
> need to be sure that actions/__init__.py and any other actions/*.py file
> import glob 'in the same way' -- currently __init__.py has "from glob
> import glob" and lava_test_shell.py has "import glob" and that's a
> problem. Even then, it depends on the order imports get executed in...
> (another approach I think would be to have "from __future__ import
> absolute_import" everywhere)

Creepy - I hadn't got that error, and I was wondering what could be the
problem. :-/

--
Antonio Terceiro
Software Engineer - Linaro
http://www.linaro.org