diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-13 19:45:23 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-13 19:45:23 +0000 |
| commit | 94ba8b91e949a3444ac4b57312c845fdc5406491 (patch) | |
| tree | 543b546e3fc78993a97400aa89cb75c4189c0040 /nova/openstack | |
| parent | f649ead6cd01368e49b4ee526ee230ecb07438f2 (diff) | |
| parent | 43677fc6dab76d9b6ad0375eba4b3c2a78e5b405 (diff) | |
| download | nova-94ba8b91e949a3444ac4b57312c845fdc5406491.tar.gz nova-94ba8b91e949a3444ac4b57312c845fdc5406491.tar.xz nova-94ba8b91e949a3444ac4b57312c845fdc5406491.zip | |
Merge "Sync importutils from openstack-common."
Diffstat (limited to 'nova/openstack')
| -rw-r--r-- | nova/openstack/common/importutils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/openstack/common/importutils.py b/nova/openstack/common/importutils.py index 67d94ad5f..2fbb0291a 100644 --- a/nova/openstack/common/importutils.py +++ b/nova/openstack/common/importutils.py @@ -20,6 +20,7 @@ Import related utilities and helper functions. """ import sys +import traceback def import_class(import_str): @@ -30,7 +31,8 @@ def import_class(import_str): return getattr(sys.modules[mod_str], class_str) except (ImportError, ValueError, AttributeError), exc: raise ImportError('Class %s cannot be found (%s)' % - (class_str, str(exc))) + (class_str, + traceback.format_exception(*sys.exc_info()))) def import_object(import_str, *args, **kwargs): |
