aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/sync.py')
-rw-r--r--backend/lib/sync.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/lib/sync.py b/backend/lib/sync.py
index 7c499b5..ba31477 100644
--- a/backend/lib/sync.py
+++ b/backend/lib/sync.py
@@ -175,15 +175,17 @@ def sync_versions():
maintainers = []
if 'maintainers' in pkg:
for maint in pkg['maintainers']:
- if 'email' not in maint:
- print("WARNING: Package %s was told to have a maintainer without an e-mail identifier" % package.full_name)
- continue
+ assert (
+ 'email' in maint and 'type' in maint,
+ "Package %s maintainer %s entry not GLEP 67 valid" % (package.full_name, maint)
+ )
+
email = maint['email'].lower()
if email in existing_maintainers:
maintainers.append(existing_maintainers[email])
else:
is_project = False
- if 'type' in maint and maint['type'] == 'project':
+ 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)