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 DC318139085 for ; Sun, 22 Jan 2017 12:24:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 49140142A6; Sun, 22 Jan 2017 12:24:19 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 28BCD142A6 for ; Sun, 22 Jan 2017 12:24:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 61F5B34169F for ; Sun, 22 Jan 2017 12:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 30FE92C76 for ; Sun, 22 Jan 2017 12:24:17 +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: <1485087836.29a6bea1536dd23adbc84454aacb2c81d0499f82.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: 29a6bea1536dd23adbc84454aacb2c81d0499f82 X-VCS-Branch: master Date: Sun, 22 Jan 2017 12:24:17 +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: dcb6f1b3-dc89-45a1-8356-9346878343a9 X-Archives-Hash: 9b4a563fc47c134701fce3ed159a0b76 commit: 29a6bea1536dd23adbc84454aacb2c81d0499f82 Author: Gilles Dartiguelongue gentoo org> AuthorDate: Sun Jan 22 12:21:36 2017 +0000 Commit: Gilles Dartiguelongue gentoo org> CommitDate: Sun Jan 22 12:23:56 2017 +0000 URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=29a6bea1 sync: replace assert with ValueError raise Simpler expression, probably here to stay. backend/lib/sync.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/lib/sync.py b/backend/lib/sync.py index 0aab3bc..429d14b 100644 --- a/backend/lib/sync.py +++ b/backend/lib/sync.py @@ -178,10 +178,11 @@ def sync_versions(): maintainers = [] if 'maintainers' in pkg: for maint in pkg['maintainers']: - assert ( - 'email' in maint and 'type' in maint, - "Package %s maintainer %s entry not GLEP 67 valid" % (package.full_name, maint) - ) + if 'email' not in maint or 'type' not in maint: + raise ValueError( + "Package %s maintainer %s entry not GLEP 67 valid" % + (package.full_name, maint) + ) email = maint['email'].lower() if email in existing_maintainers: