commit: b888c93b7892c532385626c9d2a55a8b11661e99
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 22 12:35:17 2017 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Sun Jan 22 12:35:17 2017 +0000
URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=b888c93b
sync: use dict facilities for key retrieval with a default
backend/lib/sync.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/lib/sync.py b/backend/lib/sync.py
index 4cbfe1b..723c3af 100644
--- a/backend/lib/sync.py
+++ b/backend/lib/sync.py
@@ -192,7 +192,7 @@ def sync_versions():
if maint['type'] == 'project':
is_project = True
print("Adding %s maintainer %s" % ("project" if is_project
else "individual", email))
- new_maintainer = Maintainer(email=email,
is_project=is_project, name=maint['name'] if 'name' in maint else None)
+ new_maintainer = Maintainer(email=email,
is_project=is_project, name=maint.get('name'))
db.session.add(new_maintainer)
existing_maintainers[email] = new_maintainer
maintainers.append(new_maintainer)