]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "Use oslo.utils.reflection extract the class name"
authorJenkins <jenkins@review.openstack.org>
Sat, 16 Jan 2016 03:18:50 +0000 (03:18 +0000)
committerGerrit Code Review <review@openstack.org>
Sat, 16 Jan 2016 03:18:50 +0000 (03:18 +0000)
1  2 
neutron/common/utils.py

index ca672ff9c4cfb2da26c7c82cbf2bb36e6ac09758,66e675bd174e6d20331b3f6a15c7f32b183f5a22..98e3bed120143ef00fe4670f14a941d5b6dfb410
@@@ -90,12 -93,14 +93,14 @@@ class cache_method_results(object)
          return item
  
      def __call__(self, target_self, *args, **kwargs):
+         target_self_cls_name = reflection.get_class_name(target_self,
+                                                          fully_qualified=False)
          if not hasattr(target_self, '_cache'):
              raise NotImplementedError(
 -                "Instance of class %(module)s.%(class)s must contain _cache "
 -                "attribute" % {
 +                _("Instance of class %(module)s.%(class)s must contain _cache "
 +                  "attribute") % {
                      'module': target_self.__module__,
-                     'class': target_self.__class__.__name__})
+                     'class': target_self_cls_name})
          if not target_self._cache:
              if self._first_call:
                  LOG.debug("Instance of class %(module)s.%(class)s doesn't "