Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
d9ebbcae
Verified
Commit
d9ebbcae
authored
Nov 06, 2021
by
Baptiste Beauplat
Browse files
Fail the maintainer email plugin on invalid email
Prevent getaddresses from having to process invalid values.
parent
adf55695
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/plugins/maintaineremail.py
View file @
d9ebbcae
...
...
@@ -43,11 +43,12 @@ 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
]
maintainer_email
=
maintainer_emails
[
0
][
1
]
if
changes
.
dsc
.
uploaders
:
for
_
,
uploader_email
in
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment