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
This commit is contained in:
parent
3167a6dcb7
commit
7282647bb2
1 changed files with 11 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue