summaryrefslogtreecommitdiff
path: root/lorrycontroller/lsupstreams.py
diff options
context:
space:
mode:
Diffstat (limited to 'lorrycontroller/lsupstreams.py')
-rw-r--r--lorrycontroller/lsupstreams.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/lorrycontroller/lsupstreams.py b/lorrycontroller/lsupstreams.py
index a64a496..b31a385 100644
--- a/lorrycontroller/lsupstreams.py
+++ b/lorrycontroller/lsupstreams.py
@@ -69,10 +69,11 @@ class HostRepositoryLister(object):
return None
def get_real_ls_output(self, statedb, host_info):
- gitlab_token = host_info.get('gitlab_token')
- if gitlab_token:
- return lorrycontroller.Gitlab(
- host_info['host'], gitlab_token).list_projects()
+ if host_info['type'] == 'gitlab':
+ return lorrycontroller.Gitlab(host_info['host'],
+ host_info['type_params']
+ ['private-token']) \
+ .list_projects()
gitano = lorrycontroller.new_gitano_command(
statedb, host_info['host'])
@@ -155,11 +156,12 @@ class HostRepositoryLister(object):
}
def construct_lorry_url(self, host_info, remote_path):
- gitlab_token = host_info.get('gitlab_token')
- if gitlab_token:
- return lorrycontroller.Gitlab(
- host_info['host'], gitlab_token).get_project_url(
- host_info['protocol'], remote_path)
+ if host_info['type'] == 'gitlab':
+ return lorrycontroller.Gitlab(host_info['host'],
+ host_info['type_params']
+ ['private-token']) \
+ .get_project_url(host_info['protocol'],
+ remote_path)
vars = dict(host_info)
vars['remote_path'] = remote_path