From faf8bdb5f73f6c8656cfd306c0251f286fb78431 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Wed, 18 Aug 2021 14:18:41 -0400 Subject: 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 --- b4/mbox.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'b4/mbox.py') diff --git a/b4/mbox.py b/b4/mbox.py index bf6618b..a7e9f78 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -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 -- cgit v1.2.3