summaryrefslogtreecommitdiff
path: root/lorrycontroller/gerrit.py
diff options
context:
space:
mode:
Diffstat (limited to 'lorrycontroller/gerrit.py')
-rw-r--r--lorrycontroller/gerrit.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/lorrycontroller/gerrit.py b/lorrycontroller/gerrit.py
index dad964f..0970d63 100644
--- a/lorrycontroller/gerrit.py
+++ b/lorrycontroller/gerrit.py
@@ -32,9 +32,14 @@ class GerritDownstream(hosts.DownstreamHost):
'''
def __init__(self, app_settings):
- # XXX This needs to be configurable
- url = 'ssh://lorry@localhost:29418'
- self._ssh_command = hosts.SshCommand(url, StrictHostKeyChecking='no')
+ url = app_settings['downstream-ssh-url']
+ if url is None:
+ url = 'ssh://lorry@localhost:29418'
+ key_check = 'no'
+ else:
+ key_check = 'yes'
+ self._ssh_command = hosts.SshCommand(
+ url, StrictHostKeyChecking=key_check)
def _has_project(self, name):
# There's no 'does this project exist' command in Gerrit 2.9.4; 'list