I've managed to fix it by removing the "import libvirt" from diagnostics.py. I've got the answer to this through sdague in the openstack-dev irc channel. I'ts now running :)<br><br><div class="gmail_quote">
On Tue, Jun 26, 2012 at 4:44 PM, Kevin L. Mitchell <span dir="ltr"><<a href="mailto:kevin.mitchell@rackspace.com" target="_blank">kevin.mitchell@rackspace.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, 2012-06-26 at 16:33 +0100, Leander Bessa Beernaert wrote:<br>
> I'm not calling run_tests.sh from the nova subdirectory. I'm saying<br>
> that from the location where nova_tests.sh is located, i can import<br>
> connection.py.<br>
> However, when i try to import connection.py from with<br>
> cd=nova/virt/libvirt, it fails. The funny thing is i can import all<br>
> the modules int that directory perfectly, except connection.py.<br>
<br>
</div>That's expected.  Whenever you run Python, the current directory is<br>
added to the import path.  connection.py has several absolute imports<br>
that it depends on being able to import; when you run from the top-level<br>
of the repo, things like "nova.virt.libvirt.utils" can be found, whereas<br>
importing from the nova/virt/libvirt directory means that<br>
"nova.virt.libvirt" makes no sense.<br>
<div class="HOEnZb"><div class="h5">--<br>
Kevin L. Mitchell <<a href="mailto:kevin.mitchell@rackspace.com">kevin.mitchell@rackspace.com</a>><br>
<br>
</div></div></blockquote></div><br>