summaryrefslogtreecommitdiff
path: root/pygerrit/rest/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygerrit/rest/__init__.py')
-rw-r--r--pygerrit/rest/__init__.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pygerrit/rest/__init__.py b/pygerrit/rest/__init__.py
index 99364e1..b5cfd3a 100644
--- a/pygerrit/rest/__init__.py
+++ b/pygerrit/rest/__init__.py
@@ -74,7 +74,7 @@ class GerritRestAPI(object):
""" Interface to the Gerrit REST API. """
- def __init__(self, url, auth=None):
+ def __init__(self, url, auth=None, verify=True):
""" Constructor.
`url` is assumed to be the full URL to the server, including the
@@ -84,8 +84,12 @@ class GerritRestAPI(object):
class from the `requests` module. The `url` will be adjusted if
necessary to make sure it includes Gerrit's authentication suffix.
+ If `verify` is False, the underlying requests library will be
+ configured to not attempt to verify SSL certificates.
+
"""
- self.kwargs = {'auth': auth}
+ self.kwargs = {'auth': auth,
+ 'verify': verify}
self.url = url.rstrip('/')
self.session = requests.session()