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

Replace usage of packaging.version with distutils.version.LooseVersion. (#3762)

This commit is contained in:
Felix Fontein 2021-11-20 08:58:36 +01:00 committed by GitHub
parent 58eb94fff3
commit 08067f08df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,7 @@ simple_config_file:
import json import json
import ssl import ssl
from packaging import version from distutils.version import LooseVersion
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
@ -85,7 +85,7 @@ try:
import websocket import websocket
from websocket import create_connection from websocket import create_connection
if version.parse(websocket.__version__) <= version.parse('1.0.0'): if LooseVersion(websocket.__version__) <= LooseVersion('1.0.0'):
raise ImportError raise ImportError
except ImportError as e: except ImportError as e:
HAS_WEBSOCKET = False HAS_WEBSOCKET = False