diff options
author | Maura Hausman <mhausman@wayfair.com> | 2017-07-24 18:16:06 -0400 |
---|---|---|
committer | Maura Hausman <mhausman@wayfair.com> | 2017-08-04 13:52:19 -0400 |
commit | 4af47487a279f494fd3118a01d21b401cd770d2b (patch) | |
tree | 3e67eee88bf38b3e563190bb3aaf592433b3c077 /gitlab/config.py | |
parent | 657f0119a3e13ceb07e4d0b17fa126260a4dafc7 (diff) | |
download | gitlab-4af47487a279f494fd3118a01d21b401cd770d2b.tar.gz |
Support SSL verification via internal CA bundle
- Also updates documentation
- See issues #204 and #270
Diffstat (limited to 'gitlab/config.py')
-rw-r--r-- | gitlab/config.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gitlab/config.py b/gitlab/config.py index d5e87b6..d1c29d0 100644 --- a/gitlab/config.py +++ b/gitlab/config.py @@ -61,11 +61,28 @@ class GitlabConfigParser(object): self.ssl_verify = True try: self.ssl_verify = self._config.getboolean('global', 'ssl_verify') + except ValueError: + # Value Error means the option exists but isn't a boolean. + # Get as a string instead as it should then be a local path to a + # CA bundle. + try: + self.ssl_verify = self._config.get('global', 'ssl_verify') + except Exception: + pass except Exception: pass try: self.ssl_verify = self._config.getboolean(self.gitlab_id, 'ssl_verify') + except ValueError: + # Value Error means the option exists but isn't a boolean. + # Get as a string instead as it should then be a local path to a + # CA bundle. + try: + self.ssl_verify = self._config.get(self.gitlab_id, + 'ssl_verify') + except Exception: + pass except Exception: pass |