Infinidat: Get rid of pylint errors due to private lib

Infinidat has a requirement for a vendor lib on the host
which appears to include a package called 'capacity'. Its
use and properties appear to be the same as the units
package.

When loaded and this package is not available it is set to
None, such as when running tests on generic nodes. This
results in pylint errors:

"Module 'capacity' has no 'GiB' member"

On failure to load, this aliases the units module as
capacity to prevent these errors.

Change-Id: Ia522b1c6d866acaa39439ca86c4a7bbfe4e0f70a
This commit is contained in:
Sean McGinnis 2018-06-20 13:58:29 -05:00
parent e396560f33
commit 6e2357ed86
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ try:
from infi.dtypes import wwn
import infinisdk
except ImportError:
capacity = None
from oslo_utils import units as capacity
infinisdk = None
iqn = None
wwn = None