From 87675787f5dce263802d20dddd7af79c7fd2ec82 Mon Sep 17 00:00:00 2001 From: Feng Shengqin Date: Sat, 8 Apr 2017 14:07:23 +0800 Subject: [PATCH] Remove unused compare_version docker.version()['ApiVersion'] in the function gets error in docker 1.10.6 >>> import docker >>> docker.version '1.10.6' >>> >>> docker.version()['ApiVersion'] Traceback (most recent call last): File "", line 1, in TypeError: 'str' object is not callable The patch removes compare_version due to the two functions are unused. Change-Id: If867394725eca7ee2dd7ed46c21ba4468d756f4a --- zun/container/docker/utils.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/zun/container/docker/utils.py b/zun/container/docker/utils.py index aede8fcf7..7d74841f9 100644 --- a/zun/container/docker/utils.py +++ b/zun/container/docker/utils.py @@ -12,11 +12,9 @@ import contextlib import six -import docker from docker import client from docker import errors from docker import tls -from docker.utils import utils from zun.common import exception import zun.conf @@ -25,18 +23,6 @@ from zun import objects CONF = zun.conf.CONF -def is_docker_library_version_atleast(version): - if utils.compare_version(docker.version, version) <= 0: - return True - return False - - -def is_docker_api_version_atleast(docker, version): - if utils.compare_version(docker.version()['ApiVersion'], version) <= 0: - return True - return False - - @contextlib.contextmanager def docker_client(): client_kwargs = dict()