Verified Commit d9ebbcae authored by Baptiste Beauplat's avatar Baptiste Beauplat
Browse files

Fail the maintainer email plugin on invalid email

Prevent getaddresses from having to process invalid values.
parent adf55695
......@@ -43,10 +43,11 @@ class PluginMaintainerEmail(BasePlugin):
"""
Tests whether the maintainer email is the same as the uploader email.
"""
if not changes.maintainer:
self.failed('No maintainer address found')
uploader_emails = []
maintainer_emails = email.utils.getaddresses([changes.maintainer])
if maintainer_emails:
maintainer_email = maintainer_emails[0][1]
if changes.dsc.uploaders:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment