mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-12 19:07:24 +00:00
Make sure plugins/module_utils/socket_handler.py works when Docker SDK for Python is not installed. (#620)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "socket_handler module utils - make sure this fully works when Docker SDK for Python is not available (https://github.com/ansible-collections/community.docker/pull/620)."
|
||||||
@@ -9,15 +9,11 @@ __metaclass__ = type
|
|||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import socket as pysocket
|
import socket as pysocket
|
||||||
|
import struct
|
||||||
|
|
||||||
from ansible.module_utils.six import PY2
|
from ansible.module_utils.six import PY2
|
||||||
|
|
||||||
try:
|
from ansible_collections.community.docker.plugins.module_utils._api.utils import socket as docker_socket
|
||||||
from docker.utils import socket as docker_socket
|
|
||||||
import struct
|
|
||||||
except Exception:
|
|
||||||
# missing Docker SDK for Python handled in ansible_collections.community.docker.plugins.module_utils.common
|
|
||||||
pass
|
|
||||||
|
|
||||||
from ansible_collections.community.docker.plugins.module_utils.socket_helper import (
|
from ansible_collections.community.docker.plugins.module_utils.socket_helper import (
|
||||||
make_unblocking,
|
make_unblocking,
|
||||||
|
|||||||
Reference in New Issue
Block a user