diff --git a/lib/ansible/module_utils/docker_common.py b/lib/ansible/module_utils/docker_common.py index ee4211385c..0a8abc40fb 100644 --- a/lib/ansible/module_utils/docker_common.py +++ b/lib/ansible/module_utils/docker_common.py @@ -38,7 +38,7 @@ try: from docker.tls import TLSConfig from docker.constants import DEFAULT_TIMEOUT_SECONDS, DEFAULT_DOCKER_API_VERSION from docker.utils.types import Ulimit, LogConfig -except ImportError as exc: +except ImportError, exc: HAS_DOCKER_ERROR = str(exc) HAS_DOCKER_PY = False