summaryrefslogtreecommitdiffstats
path: root/pym/portage/xml
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-25 13:13:50 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-25 13:13:50 -0700
commite5eaa26b7ff920465ee438692e825214f29fa06b (patch)
tree95cdf20973c993f2c909dbe6ae55cc28b9cc65b2 /pym/portage/xml
parentd9c4a7dec291f3f57296a1bf249887fa950bbcc1 (diff)
downloadportage-e5eaa26b7ff920465ee438692e825214f29fa06b.tar.gz
portage-e5eaa26b7ff920465ee438692e825214f29fa06b.tar.bz2
portage-e5eaa26b7ff920465ee438692e825214f29fa06b.zip
Make MetaDataXML.format_maintainer_string() check a values to make
sure they are non-empty and not just whitespace.
Diffstat (limited to 'pym/portage/xml')
-rw-r--r--pym/portage/xml/metadata.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/xml/metadata.py b/pym/portage/xml/metadata.py
index c357d9966..2d62bba99 100644
--- a/pym/portage/xml/metadata.py
+++ b/pym/portage/xml/metadata.py
@@ -323,16 +323,18 @@ class MetaDataXML(object):
"""
maintainers = []
for maintainer in self.maintainers():
- if maintainer.email is None:
- maintainers.append(maintainer.name)
+ if maintainer.email is None or not maintainer.email.strip():
+ if maintainer.name and maintainer.name.strip():
+ maintainers.append(maintainer.name)
else:
maintainers.append(maintainer.email)
for herd, email in self.herds(include_email=True):
if herd == "no-herd":
continue
- if email is None:
- maintainers.append(herd)
+ if email is None or not email.strip():
+ if herd and herd.strip():
+ maintainers.append(herd)
else:
maintainers.append(email)