diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-04-30 19:33:08 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-04-30 19:33:08 +0000 |
| commit | e0b5dc5b1ff933be4c744ebc382d2b25fe6cef63 (patch) | |
| tree | b06b9e807f80cc2e9d4e1bdc0dc9af805b8163ab | |
| parent | 13352e413c13de58f77992f7f5ef36ad1eed7735 (diff) | |
| parent | 212b3716c92a138b08ef97d8bb609e427d622d45 (diff) | |
| download | oslo-e0b5dc5b1ff933be4c744ebc382d2b25fe6cef63.tar.gz oslo-e0b5dc5b1ff933be4c744ebc382d2b25fe6cef63.tar.xz oslo-e0b5dc5b1ff933be4c744ebc382d2b25fe6cef63.zip | |
Merge "Update exception from importutils.import_class()."
| -rw-r--r-- | openstack/common/importutils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openstack/common/importutils.py b/openstack/common/importutils.py index b23d6d4..48b7af1 100644 --- a/openstack/common/importutils.py +++ b/openstack/common/importutils.py @@ -30,8 +30,9 @@ def import_class(import_str): try: __import__(mod_str) return getattr(sys.modules[mod_str], class_str) - except (ImportError, ValueError, AttributeError): - raise exception.NotFound('Class %s cannot be found' % class_str) + except (ImportError, ValueError, AttributeError), exc: + raise exception.NotFound('Class %s cannot be found (%s)' % + (class_str, str(exc))) def import_object(import_str, *args, **kwargs): |
