def has_image(self, image_name):
        """
        Is the container image with given name available?

        :param string image_name: Name of the image
        :return bool: True, if image is available. False, otherwise
        """

        try:
            self.docker_client.images.get(image_name)
            return True
        except docker.errors.ImageNotFound:
            return False
def has_image ( self , image_name ) : try : self . docker_client . images . get ( image_name ) return True except docker . errors . ImageNotFound : return False
Is the container image with given name available?

        :param string image_name: Name of the image
        :return bool: True, if image is available. False, otherwise