From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8ED61139086 for ; Sun, 22 Jan 2017 12:00:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC3FC234129; Sun, 22 Jan 2017 12:00:44 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BC82F234129 for ; Sun, 22 Jan 2017 12:00:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4769A34164D for ; Sun, 22 Jan 2017 12:00:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB3C62C6F for ; Sun, 22 Jan 2017 12:00:41 +0000 (UTC) From: "Gilles Dartiguelongue" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Gilles Dartiguelongue" Message-ID: <1485086420.793722996da7f8c9120c678b16350363d30c6bf1.eva@gentoo> Subject: [gentoo-commits] proj/grumpy:master commit in: backend/lib/ X-VCS-Repository: proj/grumpy X-VCS-Files: backend/lib/sync.py X-VCS-Directories: backend/lib/ X-VCS-Committer: eva X-VCS-Committer-Name: Gilles Dartiguelongue X-VCS-Revision: 793722996da7f8c9120c678b16350363d30c6bf1 X-VCS-Branch: master Date: Sun, 22 Jan 2017 12:00:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0354be0e-b0bb-4fec-9e00-f3f0eac242f2 X-Archives-Hash: 06d9459dad5fc3cb91652561f97c36c2 commit: 793722996da7f8c9120c678b16350363d30c6bf1 Author: Gilles Dartiguelongue gentoo org> AuthorDate: Sun Jan 22 11:39:41 2017 +0000 Commit: Gilles Dartiguelongue gentoo org> CommitDate: Sun Jan 22 12:00:20 2017 +0000 URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=79372299 sync: use assert for GLEP67 compliance check Should never be raised actually but who knows. backend/lib/sync.py | 10 ++++++---- 1 file 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)