summaryrefslogtreecommitdiff
path: root/oslo
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-10-13 13:29:05 +0000
committerGerrit Code Review <review@openstack.org>2014-10-13 13:29:05 +0000
commitb427eb4505bb416ce364caa8ff3f30380ff113a9 (patch)
tree9e7287003ca7e16b19c6f302c87e1ac63780a30c /oslo
parent33011a51b23af06eee29a493b6c7efacc7be0b1e (diff)
parent64f6062cb4b15995e58b84dbbf4705504030c282 (diff)
downloadoslo-db-b427eb4505bb416ce364caa8ff3f30380ff113a9.tar.gz
Merge "Improve error reporting for backend import failures"
Diffstat (limited to 'oslo')
-rw-r--r--oslo/db/api.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/oslo/db/api.py b/oslo/db/api.py
index 8b7bdeb..906e88d 100644
--- a/oslo/db/api.py
+++ b/oslo/db/api.py
@@ -177,10 +177,10 @@ class DBAPI(object):
# Import the untranslated name if we don't have a mapping
backend_path = self._backend_mapping.get(self._backend_name,
self._backend_name)
- backend_mod = importutils.try_import(backend_path)
- if not backend_mod:
- raise ImportError("Unable to import backend '%s'" %
- self._backend_name)
+ LOG.debug('Loading backend %(name)r from %(path)r',
+ {'name': self._backend_name,
+ 'path': backend_path})
+ backend_mod = importutils.import_module(backend_path)
self._backend = backend_mod.get_backend()
def __getattr__(self, key):