Add a helper method to Image to parse ancestor string.
This commit is contained in:
parent
cd8b45e25b
commit
1d8b72235a
6 changed files with 33 additions and 32 deletions
|
@ -157,7 +157,7 @@ def garbage_collect_repo(repo):
|
|||
def gen_referenced_ancestors():
|
||||
for tagged_image in tagged_images:
|
||||
# The ancestor list is in the format '/1/2/3/', extract just the ids
|
||||
ancestor_id_strings = tagged_image.ancestors.split('/')[1:-1]
|
||||
ancestor_id_strings = tagged_image.ancestor_list()
|
||||
for img_id_str in ancestor_id_strings:
|
||||
yield int(img_id_str)
|
||||
yield tagged_image.id
|
||||
|
|
Reference in a new issue