Glance has a copy of the nova import_class() utility function, and has this same problem. Nova bug 820642, original description:
The utils.import_class() function does a very handy thing, but it catches ImportError and simply raises a NotFound exception without including in the message what the original error was. This caused a problem when glance added xattr to its requirements, in that all we get is this mysterious message that "Client could not be found". It wouldn't take much to augment the "NotFound" message with the text of the original exception, which could give us a better clue as to how to fix the problem.
Reviewed: https:/ /review. openstack. org/825 github. com/openstack/ glance/ commit/ 53db059772d8c89 facd17970fc967e f2fa1866c5
Committed: http://
Submitter: Jenkins
Branch: master
status fixcommitted
done
commit 53db059772d8c89 facd17970fc967e f2fa1866c5
Author: Jay Pipes <email address hidden>
Date: Mon Oct 10 13:44:22 2011 -0400
Refactoring /cleanup around our exception handling
Fixes LP Bug #820643 - import_class() does not
report original exception.
* Makes ALL exceptions now use base exception class
* Removes unused exception classes from Nova
* Removes unused code in glance.common.utils
* Adds unit tests for bool_from_string and import_class
Change-Id: If6775eb3ce8539 0bc5d579dff6c59 c6066e77e9b