diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2017-01-22 13:35:17 +0100 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2017-01-22 13:35:17 +0100 |
commit | b888c93b7892c532385626c9d2a55a8b11661e99 (patch) | |
tree | 78a165d6e9d8896e5f61138d9fc439ae91e34529 /backend/lib/sync.py | |
parent | sync: reduce unneeded conditional evaluation (diff) | |
download | grumpy-b888c93b7892c532385626c9d2a55a8b11661e99.tar.gz grumpy-b888c93b7892c532385626c9d2a55a8b11661e99.tar.bz2 grumpy-b888c93b7892c532385626c9d2a55a8b11661e99.zip |
sync: use dict facilities for key retrieval with a default
Diffstat (limited to 'backend/lib/sync.py')
-rw-r--r-- | backend/lib/sync.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |