Skip to content
Snippets Groups Projects
Verified Commit ae514a84 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

gitlab.lister: Do not expect gitlab instances to have credentials

Only the main gitlab.com instance supports a rate limit (thus the
credentials need), others do not (as per summer 2018).
parent f72f2bc6
No related branches found
No related tags found
No related merge requests found
......@@ -59,11 +59,9 @@ class GitLabLister(PageByPageHttpLister):
params = {
'headers': self.request_headers() or {}
}
# Retrieve the credentials per instance
creds = self.config['credentials']
if creds:
creds_lister = creds[self.instance]
auth = random.choice(creds_lister) if creds else None
creds_lister = self.config['credentials'].get(self.instance)
if creds_lister:
auth = random.choice(creds_lister)
if auth:
params['auth'] = (auth['username'], auth['password'])
return params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment