From 9143299d84197af6534db2c9d5d6c8cd4f5bd427 Mon Sep 17 00:00:00 2001 From: EvanLi Date: Thu, 27 Dec 2018 21:29:38 +0800 Subject: [PATCH] Edit python script. --- save_most_stars_forks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/save_most_stars_forks.py b/save_most_stars_forks.py index ae2bf3912..c08787e04 100644 --- a/save_most_stars_forks.py +++ b/save_most_stars_forks.py @@ -29,8 +29,9 @@ def save_ranking(file_name,method,repos): count = 0 for repo in repos: count += 1 - if repo['description'] is not None: - repo_description = repo['description'].replace('|','\|') #in case there is '|' in description + repo_description = repo['description'] + if repo_description is not None: + repo_description = repo_description.replace('|','\|') #in case there is '|' in description f.write('| {} | [{}]({}) | {} | {} | {} | {} | {} | {} |\n'.format(count, repo['name'], repo['html_url'],