import_class() does not report original exception

Bug #820643 reported by Kevin L. Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Jay Pipes

Bug Description

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.

Jay Pipes (jaypipes)
Changed in glance:
status: New → Confirmed
importance: Undecided → Low
milestone: none → diablo-4
Jay Pipes (jaypipes)
Changed in glance:
milestone: diablo-4 → diablo-rbp
Thierry Carrez (ttx)
Changed in glance:
milestone: diablo-rbp → 2011.3
Jay Pipes (jaypipes)
Changed in glance:
milestone: 2011.3 → none
Jay Pipes (jaypipes)
Changed in glance:
milestone: none → essex-1
Jay Pipes (jaypipes)
Changed in glance:
assignee: nobody → Jay Pipes (jaypipes)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/glance

Reviewed: https://review.openstack.org/825
Committed: http://github.com/openstack/glance/commit/53db059772d8c89facd17970fc967ef2fa1866c5
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 53db059772d8c89facd17970fc967ef2fa1866c5
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: If6775eb3ce85390bc5d579dff6c59c6066e77e9b

Changed in glance:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: essex-1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.