Skip to content

Commit 07178a7

Browse files
authored
Fix release link validations. (#4970)
1 parent a1dee87 commit 07178a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

utils/validate_release_links.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,16 @@ def check_file(
8787
new_file_name = os.path.join(tempdir, os.path.basename(filename))
8888
with open(new_file_name, "w+") as new_file:
8989
# default to match everything if there is nothing in the ALLOW_LIST
90-
allow_list_pattern = ALLOW_LIST.get(filename, MATCH_ANY)
90+
allow_list_pattern = ALLOW_LIST.get(filename, None)
9191
with open(filename) as f:
9292
for line in f:
9393
keep_line = True
9494
keep_line = not RELEASE_PATTERN.search(line)
9595
keep_line |= global_allow_pattern.search(line) is not None
96-
keep_line |= allow_list_pattern.search(line) is not None
96+
keep_line |= (
97+
allow_list_pattern is not None
98+
and allow_list_pattern.search(line) is not None
99+
)
97100

98101
if keep_line:
99102
new_file.write(line)

0 commit comments

Comments
 (0)