summaryrefslogtreecommitdiff
path: root/gitlab/config.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2020-04-07 10:41:17 +0200
committerGitHub <noreply@github.com>2020-04-07 10:41:17 +0200
commit6749859505db73655f13a7950e70b67c1ee1d0fb (patch)
treee5342d52dc7c7dfbdaf2ed14b79c9d28a147ac30 /gitlab/config.py
parent5979750fcc953148fcca910c04258f56c3027bce (diff)
parent79fef262c3e05ff626981c891d9377abb1e18533 (diff)
downloadgitlab-6749859505db73655f13a7950e70b67c1ee1d0fb.tar.gz
Merge pull request #1059 from python-gitlab/fix/raise-from
chore: use raise..from for chained exceptions (#939)
Diffstat (limited to 'gitlab/config.py')
-rw-r--r--gitlab/config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/config.py b/gitlab/config.py
index 2272dd3..1b665ed 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -60,18 +60,18 @@ class GitlabConfigParser(object):
if self.gitlab_id is None:
try:
self.gitlab_id = self._config.get("global", "default")
- except Exception:
+ except Exception as e:
raise GitlabIDError(
"Impossible to get the gitlab id (not specified in config file)"
- )
+ ) from e
try:
self.url = self._config.get(self.gitlab_id, "url")
- except Exception:
+ except Exception as e:
raise GitlabDataError(
"Impossible to get gitlab informations from "
"configuration (%s)" % self.gitlab_id
- )
+ ) from e
self.ssl_verify = True
try: