← Back to team overview

openstack-poc team mailing list archive

[Bug 925775] [NEW] utils.import_object sometimes masks the failed import

 

Public bug reported:

146 def import_class(import_str):
147     """Returns a class from a string including module and class"""
148     mod_str, _sep, class_str = import_str.rpartition('.')
149     try:
150         __import__(mod_str)
151         return getattr(sys.modules[mod_str], class_str)
152     except (ImportError, ValueError, AttributeError):
153         raise exception.NotFound('Class %s cannot be found' % class_str)

>From time to time we are seeing the exception raised without the
class_str being filled in making it fun to track down what is not
installed.

** Affects: openstack-common
     Importance: Undecided
         Status: Confirmed

-- 
You received this bug notification because you are a member of OpenStack
Common Drivers, which is the registrant for openstack-common.
https://bugs.launchpad.net/bugs/925775

Title:
  utils.import_object sometimes masks the failed import

Status in openstack-common:
  Confirmed

Bug description:
  146 def import_class(import_str):
  147     """Returns a class from a string including module and class"""
  148     mod_str, _sep, class_str = import_str.rpartition('.')
  149     try:
  150         __import__(mod_str)
  151         return getattr(sys.modules[mod_str], class_str)
  152     except (ImportError, ValueError, AttributeError):
  153         raise exception.NotFound('Class %s cannot be found' % class_str)

  From time to time we are seeing the exception raised without the
  class_str being filled in making it fun to track down what is not
  installed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openstack-common/+bug/925775/+subscriptions


Follow ups

References