diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-08-18 14:18:41 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-08-18 14:20:12 -0400 |
commit | faf8bdb5f73f6c8656cfd306c0251f286fb78431 (patch) | |
tree | 9db9b6420cb58c241038821923c26e292eae4ca0 /b4/mbox.py | |
parent | dd6997138e01357d95c0e0212d9af33b977fd012 (diff) | |
download | b4-faf8bdb5f73f6c8656cfd306c0251f286fb78431.tar.gz |
Remove kludges that were needed before /all/
Extindex allows us to get rid of a couple of kludges:
- we no longer need to manually backfill, as /all/ contains all sources
- we can just query /all/ for new series
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/mbox.py')
-rw-r--r-- | b4/mbox.py | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -398,15 +398,14 @@ def get_extra_series(msgs: list, direction: int = 1, wantvers: Optional[int] = N config = b4.get_main_config() loc = urllib.parse.urlparse(config['midmask']) if not useproject: - projects = b4.get_lore_projects_from_msg(base_msg) - if not projects: - logger.info('Unable to figure out list archive location') - return msgs - useproject = projects[0] - - listarc = '%s://%s/%s/' % (loc.scheme, loc.netloc, useproject) - - if not listarc: + useproject = 'all' + + listarc = f'{loc.scheme}://{loc.netloc}/{useproject}/' + # Make sure it exists + queryurl = f'{listarc}_/text/config/raw' + session = b4.get_requests_session() + resp = session.get(queryurl) + if not resp.status_code == 200: logger.info('Unable to figure out list archive location') return msgs |