Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With the default value of `""` for the `IGNORE_TAGS_REGEX` we ended up with zero-length matches, which caused many image tags to be ignored as the matching didn't return a `None`. An example that can demonstrate this behavior is: ```python import re REGEX='' string='something' response = re.compile(REGEX).match(string) print("Type: {}".format(type(response))) # Type: <type '_sre.SRE_Match'> print("First position of matching: {}".format(response.start())) # 0 print("Last position of matching: {}".format(response.end())) # 0 print("---") REGEX='^$' string='something' response = re.compile(REGEX).match(string) print("Type: {}".format(type(response))) # Type: <type 'NoneType'> ``` --- Before this modification we had: ``` Starting with repository :... Total number of images found: 513 Number of untagged images found 3 Number of running images found 1 Number of images to be deleted: 3 ``` And after: ``` Starting with repository :... Total number of images found: 513 Number of untagged images found 3 Number of running images found 1 Number of images to be deleted: 503 ``` Which is more aligned with the expected behavior.
- Loading branch information