]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Fix importing of quantum resources subpackage
authorZane Bitter <zbitter@redhat.com>
Wed, 5 Dec 2012 10:15:42 +0000 (11:15 +0100)
committerZane Bitter <zbitter@redhat.com>
Wed, 5 Dec 2012 10:15:42 +0000 (11:15 +0100)
commit8a3a8d6fe4a8680126a62f90f619da5093c937e4
tree6ce9a4f11e7b44c6a46b61d3730f75d98a6c1100
parent93688df4404afbf521b70700e92bb77d3259ba41
Fix importing of quantum resources subpackage

Apparently pkgutil.walk_packages(path) will return packages outside the
given path if they have the same names as the ones inside - so having a
quantum subpackage results in importing the global quantum package from
Quantum itself instead. Fix this by passing a package prefix to give a
fully qualified name.

Also make sure that submodules are added as an attribute to their immediate
parent package, not to some grandparent package with '.'s in the attribute
name.

bug 1085725

Change-Id: Ie571100898a33ed4fe15d1878c7b16db4caf4fa5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat/common/plugin_loader.py
heat/tests/test_plugin_loader.py