1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

module_utils/avi.py: fix broken import

This commit is contained in:
Pierre-Louis Bonicoli 2017-09-08 02:25:39 +02:00 committed by Matt Clay
parent ed0c2678cc
commit e9d202f944
2 changed files with 2 additions and 3 deletions

View file

@ -33,13 +33,13 @@
from __future__ import absolute_import
import os
from pkg_resources import parse_version
from distutils.version import LooseVersion
HAS_AVI = True
try:
import avi.sdk
sdk_version = getattr(avi.sdk, '__version__', None)
if ((sdk_version is None) or (sdk_version and (parse_version(sdk_version) < parse_version('17.1')))):
if ((sdk_version is None) or (sdk_version and (LooseVersion(sdk_version) < LooseVersion('17.1')))):
# It allows the __version__ to be '' as that value is used in development builds
raise ImportError
from avi.sdk.utils.ansible_utils import avi_ansible_api

View file

@ -1,5 +1,4 @@
lib/ansible/module_utils/ansible_tower.py
lib/ansible/module_utils/avi.py
lib/ansible/modules/cloud/amazon/cloudtrail.py
lib/ansible/modules/cloud/amazon/ec2_vpc_igw.py
lib/ansible/modules/cloud/amazon/ec2_vpc_route_table.py