processing: fix scan_metadata.py when the new maintainer name is None

This commit is contained in:
Corentin Chary 2013-11-21 10:28:22 +01:00
parent c130e59b28
commit 84e32e1554

View File

@ -136,11 +136,13 @@ class ScanMetadata(object):
for maintainer in pkg.maintainers.all(): for maintainer in pkg.maintainers.all():
email = maintainer.email email = maintainer.email
name = maintainer.name
if email in old_maintainers: if email in old_maintainers:
pkg.maintainers.remove(maintainer) pkg.maintainers.remove(maintainer)
if (email in maintainers and if (email in maintainers and
email == maintainer.name and email == name and
maintainers[email].name != maintainer.name): maintainers[email].name != name and
maintainers[email].name):
maintainer.name = maintainers[email].name maintainer.name = maintainers[email].name
maintainer.save() maintainer.save()