浏览代码

Fix release link validations. (#4970)

/release_13_branch
GitHub 4 年前
当前提交
92556b49
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 7
      utils/validate_release_links.py

7
utils/validate_release_links.py


new_file_name = os.path.join(tempdir, os.path.basename(filename))
with open(new_file_name, "w+") as new_file:
# default to match everything if there is nothing in the ALLOW_LIST
allow_list_pattern = ALLOW_LIST.get(filename, MATCH_ANY)
allow_list_pattern = ALLOW_LIST.get(filename, None)
keep_line |= allow_list_pattern.search(line) is not None
keep_line |= (
allow_list_pattern is not None
and allow_list_pattern.search(line) is not None
)
if keep_line:
new_file.write(line)

正在加载...
取消
保存