Add --server option to openapproved script

Add the possibility to choose a gerrit server in this script, to
be consistent with the other command-line utilities.

Change-Id: If17f9dc3262ebc04cc8c8cabc3cdee04c0b14d5c
This commit is contained in:
Matthieu Huin 2015-03-26 17:38:17 +01:00
parent fb538503b0
commit 92f36be0bb

View File

@ -44,8 +44,10 @@ def main(argv=None):
'-k', '--key', default=None, help='ssh key for gerrit')
optparser.add_option('-s', '--stable', action='store_true',
help='Include stable branch commits')
optparser.add_option(
'--server', default='review.openstack.org',
help='Gerrit server to connect to')
options, args = optparser.parse_args()
projects = utils.get_projects_info(options.project, options.all)
if not projects:
@ -53,7 +55,8 @@ def main(argv=None):
sys.exit(1)
changes = utils.get_changes(projects, options.user, options.key,
only_open=True)
only_open=True,
server=options.server)
approved_and_rebased = set()
for change in changes: