Ver código fonte

Use set for tags

master
Ricardo Branco 5 anos atrás
pai
commit
13f01e3b22
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      clean_registry.py

+ 1
- 1
clean_registry.py Ver arquivo

103
         return False
103
         return False
104
 
104
 
105
     if args.remove:
105
     if args.remove:
106
-        tags = os.listdir(repo + "/_manifests/tags/")
106
+        tags = set(os.listdir(repo + "/_manifests/tags/"))
107
         if not tag or len(tags) == 1 and tag in tags:
107
         if not tag or len(tags) == 1 and tag in tags:
108
             remove(repo)
108
             remove(repo)
109
             return True
109
             return True

Carregando…
Cancelar
Salvar