lister: Support multiple credentials
This commit is contained in:
parent
4d53974e0c
commit
0331ba4c7b
2 changed files with 17 additions and 4 deletions
15
bin/ghlister
15
bin/ghlister
|
@ -100,6 +100,21 @@ def read_conf(args):
|
|||
else:
|
||||
conf['cache_json'] = False
|
||||
|
||||
if 'credentials' in conf:
|
||||
credentials = conf['credentials'].split()
|
||||
conf['credentials'] = []
|
||||
for user_pair in credentials:
|
||||
username, password = user_pair.split(':')
|
||||
conf['credentials'].append({
|
||||
'username': username,
|
||||
'password': password,
|
||||
})
|
||||
else:
|
||||
conf['credentials'] = [{
|
||||
'username': conf['username'],
|
||||
'password': conf['password'],
|
||||
}]
|
||||
|
||||
return conf
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue