From ecb9179750652b3f1c5cdd54e84d024fe0b77e72 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 3 Oct 2020 07:25:10 +0200 Subject: [PATCH 1/2] Scripts/get_all_links: Properly close files `get_all_links.py` opens files for reading urls in those, but do not closes those. This commit makes the script to properly close the files. Signed-off-by: SeongJae Park --- Scripts/get_all_links.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/get_all_links.py b/Scripts/get_all_links.py index c8fdd79..f5abbec 100755 --- a/Scripts/get_all_links.py +++ b/Scripts/get_all_links.py @@ -56,6 +56,7 @@ def main(path): for ref in refs: if ref not in urls: urls.append(ref) + fd.close() #print(len(urls)) From 55b491917903f67f7c3ad03fbb833f4e75ea53e5 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Sat, 3 Oct 2020 07:26:28 +0200 Subject: [PATCH 2/2] Scripts/get_all_links: Remove unnecessary comment Signed-off-by: SeongJae Park --- Scripts/get_all_links.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Scripts/get_all_links.py b/Scripts/get_all_links.py index f5abbec..395820f 100755 --- a/Scripts/get_all_links.py +++ b/Scripts/get_all_links.py @@ -58,8 +58,6 @@ def main(path): urls.append(ref) fd.close() - #print(len(urls)) - for url in urls: if not url.startswith("http"): print("markdown file name: " + url)