aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2017-01-22 13:21:36 +0100
committerGilles Dartiguelongue <eva@gentoo.org>2017-01-22 13:23:56 +0100
commit29a6bea1536dd23adbc84454aacb2c81d0499f82 (patch)
tree2b33e0c48916a4be101dbead21c95dc11e5a691d /backend/lib/sync.py
parentsync: define project keys default values (diff)
downloadgrumpy-29a6bea1536dd23adbc84454aacb2c81d0499f82.tar.gz
grumpy-29a6bea1536dd23adbc84454aacb2c81d0499f82.tar.bz2
grumpy-29a6bea1536dd23adbc84454aacb2c81d0499f82.zip
sync: replace assert with ValueError raise
Simpler expression, probably here to stay.
Diffstat (limited to 'backend/lib/sync.py')
-rw-r--r--backend/lib/sync.py9
1 files 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: