'Create Docker client connection'

def get_client(self):

    try:
        if (self.client is None):
            self.client = Client(base_url=self.docker_socket, version=DOCKER_VERSION, timeout=None)
        return self.client
    except DockerException as e:
        log.error(LOG_TEMPLATE.format(project=self.project.slug, version=self.version.slug, msg=e), exc_info=True)
        raise BuildEnvironmentError('Problem    creating    build    environment')
