Fixes DiskInfoPollster AttributeError exception

If a NotImplementedError exception is raised while getting samples through
a DiskInfoPollster, another exception occurs, as it tries to access an
attribute that does not exist.

Replaces the usage of manager.inspector with self.inspector.

Change-Id: Ie1bb6eaffc0b2671f8fefb4771dbd2191eb5cf5f
Closes-Bug: #1460207
This commit is contained in:
Octavian Ciuhandu 2015-05-29 14:15:58 -07:00
parent e71e391a4f
commit b8b90ac0fd

View File

@ -706,7 +706,7 @@ class _DiskInfoPollsterBase(pollsters.BaseComputePollster):
# Selected inspector does not implement this pollster.
LOG.debug(_('%(inspector)s does not provide data for '
' %(pollster)s'), (
{'inspector': manager.inspector.__class__.__name__,
{'inspector': self.inspector.__class__.__name__,
'pollster': self.__class__.__name__}))
except Exception as err:
instance_name = util.instance_name(instance)