diff options
Diffstat (limited to 'lorrycontroller/gerrit.py')
-rw-r--r-- | lorrycontroller/gerrit.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lorrycontroller/gerrit.py b/lorrycontroller/gerrit.py index 629d00d..c2c81b8 100644 --- a/lorrycontroller/gerrit.py +++ b/lorrycontroller/gerrit.py @@ -21,7 +21,6 @@ from . import hosts class GerritDownstream(hosts.DownstreamHost): - '''Run commands on a Gerrit instance. This uses the SSH API to Gerrit. The REST API is actually much nicer to @@ -39,6 +38,12 @@ class GerritDownstream(hosts.DownstreamHost): default='All-Projects', metavar='PROJECT') + @staticmethod + def check_app_settings(app_settings): + if app_settings['downstream-visibility'] != 'private': + raise cliapp.ApplicationError( + 'Cannot create non-private repositories in Gerrit') + def __init__(self, app_settings): url = app_settings['downstream-ssh-url'] if url is None: |