| |
@@ -114,12 +114,13 @@
|
| |
project_commits = project.get_commits()
|
| |
contributors = []
|
| |
for commit in project_commits:
|
| |
- contributor = {'fullname': commit.author.name,
|
| |
- 'emails': commit.commit.author.email,
|
| |
- 'name': commit.author.login}
|
| |
- if contributor not in contributors:
|
| |
- contributors.append(contributor)
|
| |
- click.echo('contributor added: ' + contributor['name'])
|
| |
+ if commit.author is not None and commit.author.email is not None:
|
| |
+ contributor = {'fullname': commit.author.name,
|
| |
+ 'emails': commit.commit.author.email,
|
| |
+ 'name': commit.author.login}
|
| |
+ if contributor not in contributors:
|
| |
+ contributors.append(contributor)
|
| |
+ click.echo('contributor added: ' + contributor['name'])
|
| |
|
| |
with open('contributors.json', 'w') as f:
|
| |
f.write(json.dumps(contributors))
|
| |
if you add a try except block around this code it should work. I think it is acceptable to ignore the exception here.