lister: Unify credentials structure between listers

This becomes a dictionary of key <lister-name>, value a dict of key
<instance-name>, value list of dict username/password.

Related T1772
This commit is contained in:
Antoine R. Dumont (@ardumont) 2019-05-29 12:05:51 +02:00
parent d6169c7141
commit b81621274b
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
12 changed files with 56 additions and 31 deletions

View file

@ -1,4 +1,4 @@
# Copyright (C) 2017-2018 the Software Heritage developers
# Copyright (C) 2017-2019 the Software Heritage developers
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@ -14,6 +14,7 @@ class GitHubLister(SWHIndexingHttpLister):
MODEL = GitHubModel
API_URL_INDEX_RE = re.compile(r'^.*/repositories\?since=(\d+)')
LISTER_NAME = 'github'
instance = 'github' # There is only 1 instance of such lister
def get_model_from_repo(self, repo):
return {