Skip to content

image.tag does not return anything #1588

@JettJones

Description

@JettJones

There's no return statement in images.tag:
https://github.com/docker/docker-py/blob/master/docker/models/images.py#L99

Readthedocs (and the method comments) suggest it should return a bool for success.

I saw this running version 2.2.1 of the library

# pip freeze | grep docker
docker==2.2.1
docker-pycreds==0.2.1

Repro code:

import docker
def test_tag(id):
    client = docker.DockerClient()
    image = client.images.get(id)
    tag_result = image.tag('test_image', tag='test_tag')
    if tag_result is None:
        print('oops')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions