summaryrefslogtreecommitdiff
path: root/horizon/base.py
diff options
context:
space:
mode:
authorGabriel Hurley <gabriel@strikeawe.com>2012-04-04 16:16:53 -0700
committerGabriel Hurley <gabriel@strikeawe.com>2012-04-04 16:16:53 -0700
commita4679bc7b5ad66e5e45cc17fa73df1eb00cf056b (patch)
tree7b4827d27ad6e474118387e6eba4352579a93242 /horizon/base.py
parentbf9abd581179e653b4119eca8bb0c50b3ca2a834 (diff)
downloadhorizon-a4679bc7b5ad66e5e45cc17fa73df1eb00cf056b.tar.gz
Corrects the ImportError handling for the override mechanism.
Fixes bug 973836. Change-Id: Ide849ca230d1e07c7242268d32f06600e09c6746
Diffstat (limited to 'horizon/base.py')
-rw-r--r--horizon/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/horizon/base.py b/horizon/base.py
index 68588e5e3..da6a56e63 100644
--- a/horizon/base.py
+++ b/horizon/base.py
@@ -743,12 +743,13 @@ class Site(Registry, HorizonComponent):
bits = customization_module.split('.')
mod_name = bits.pop()
package = '.'.join(bits)
+ mod = import_module(package)
try:
before_import_registry = copy.copy(self._registry)
import_module('%s.%s' % (package, mod_name))
except:
self._registry = before_import_registry
- if module_has_submodule(package, mod_name):
+ if module_has_submodule(mod, mod_name):
raise
# Compile the dynamic urlconf.