From 7282647bb2d3351182a6fc115eb64bee4bb83bb7 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org> Date: Fri, 7 May 2021 16:10:11 +0200 Subject: [PATCH] sourceforge/lister: Add credentials parameter The credentials parameter is not optional due to the instance constructor logic. Even if unused, this must be provided to the lister (from the task standpoint). Related to T3310#64801 --- swh/lister/sourceforge/lister.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/swh/lister/sourceforge/lister.py b/swh/lister/sourceforge/lister.py index 909f0b51..6a00c5f9 100644 --- a/swh/lister/sourceforge/lister.py +++ b/swh/lister/sourceforge/lister.py @@ -20,7 +20,7 @@ from swh.scheduler.interface import SchedulerInterface from swh.scheduler.model import ListedOrigin from .. import USER_AGENT -from ..pattern import Lister +from ..pattern import CredentialsType, Lister logger = logging.getLogger(__name__) @@ -108,9 +108,17 @@ class SourceForgeLister(Lister[SourceForgeListerState, SourceForgeListerPage]): # Part of the lister API, that identifies this lister LISTER_NAME = "sourceforge" - def __init__(self, scheduler: SchedulerInterface, incremental: bool = False): + def __init__( + self, + scheduler: SchedulerInterface, + incremental: bool = False, + credentials: Optional[CredentialsType] = None, + ): super().__init__( - scheduler=scheduler, url="https://sourceforge.net", instance="main" + scheduler=scheduler, + url="https://sourceforge.net", + instance="main", + credentials=credentials, ) # Will hold the currently saved "last modified" dates to compare against our -- GitLab