Be tolerant to missing mail archive list page

Avoid failure when mail archive page is not found or empty.
Also remove non-existing OPNFV mail list.

Change-Id: Id7554e313d94cca7062fa662f45b526d88f1bac3
This commit is contained in:
Ilya Shakhat
2017-05-12 13:49:32 +04:00
parent 44f9052e98
commit c5ab0465ab
2 changed files with 4 additions and 1 deletions

View File

@@ -30063,7 +30063,6 @@
"https://lists.opnfv.org/pipermail/fds-dev/",
"https://lists.opnfv.org/pipermail/infra-wg/",
"https://lists.opnfv.org/pipermail/mano-wg/",
"https://lists.opnfv.org/pipermail/odl-wg/",
"https://lists.opnfv.org/pipermail/openstack-dev/",
"https://lists.opnfv.org/pipermail/opnfv-enduser-advisory-group/",
"https://lists.opnfv.org/pipermail/opnfv-project-leads/",

View File

@@ -54,6 +54,10 @@ TRAILING_RECORD = ('From ishakhat at mirantis.com Tue Sep 17 07:30:43 2013\n'
def _get_mail_archive_links(uri):
content = utils.read_uri(uri)
if not content:
LOG.warning('Mail archive list is not found at %s', uri)
return []
links = set(re.findall(r'\shref\s*=\s*[\'"]([^\'"]*\.txt\.gz)', content,
flags=re.IGNORECASE))
return [parse.urljoin(uri, link) for link in links]