From 2fd158df03e12c309603821dd35f7a7cfaba5f9b Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 20 May 2022 20:06:26 +0300
Subject: [PATCH] Use the Docker's SDK repository name parser.

Intead of my worst implementation.
---
 deepclean/__main__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deepclean/__main__.py b/deepclean/__main__.py
index d87e37d..1e37166 100644
--- a/deepclean/__main__.py
+++ b/deepclean/__main__.py
@@ -92,7 +92,7 @@ def deepclean(
     # First we build a dictionary with the image name as key and the value is
     # an empty list that later will contain the images that have that name.
     images_by_name = {
-        name.split(":")[0]: []
+        docker.utils.parse_repository_tag(name)[0]: []
         for image in images.values()
         for name in image.tags
     }
-- 
GitLab