From bed59cec5e5a9a5668cf2c7df3a24545b1e76c09 Mon Sep 17 00:00:00 2001 From: Łukasz Gardoń Date: Tue, 8 Aug 2017 10:18:11 +0200 Subject: Add option '--no-cert-checks' for 'upload' sub command. This option allow to bypass verification ssl certification while establishing connection with Gerrit to upload review. Change-Id: If2e15f5a273c18a700eb5093ca8a4d5a4cbf80cd --- project.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index 0b7baeed..c2cccb4f 100644 --- a/project.py +++ b/project.py @@ -178,14 +178,16 @@ class ReviewableBranch(object): draft=False, private=False, wip=False, - dest_branch=None): + dest_branch=None, + validate_certs=True): self.project.UploadForReview(self.name, people, auto_topic=auto_topic, draft=draft, private=private, wip=wip, - dest_branch=dest_branch) + dest_branch=dest_branch, + validate_certs=validate_certs) def GetPublishedRefs(self): refs = {} @@ -1113,7 +1115,8 @@ class Project(object): draft=False, private=False, wip=False, - dest_branch=None): + dest_branch=None, + validate_certs=True): """Uploads the named branch for code review. """ if branch is None: @@ -1138,7 +1141,7 @@ class Project(object): branch.remote.projectname = self.name branch.remote.Save() - url = branch.remote.ReviewUrl(self.UserEmail) + url = branch.remote.ReviewUrl(self.UserEmail, validate_certs) if url is None: raise UploadError('review not configured') cmd = ['push'] -- cgit v1.2.3-54-g00ecf