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:
parent
58eb94fff3
commit
08067f08df
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ simple_config_file:
|
|||
import json
|
||||
import ssl
|
||||
|
||||
from packaging import version
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable
|
||||
|
@ -85,7 +85,7 @@ try:
|
|||
import websocket
|
||||
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
|
||||
except ImportError as e:
|
||||
HAS_WEBSOCKET = False
|
||||
|
|
Loading…
Reference in a new issue