diff options
| author | Nejc Habjan <hab.nejc@gmail.com> | 2020-03-30 01:19:23 +0200 |
|---|---|---|
| committer | Nejc Habjan <hab.nejc@gmail.com> | 2020-03-30 01:19:23 +0200 |
| commit | 79fef262c3e05ff626981c891d9377abb1e18533 (patch) | |
| tree | 360a2e7d0196441fff5132edaaede48c1e8fa283 /gitlab/config.py | |
| parent | c5904c4c2e79ec302ff0de20bcb2792be4924bbe (diff) | |
| download | gitlab-79fef262c3e05ff626981c891d9377abb1e18533.tar.gz | |
chore: use raise..from for chained exceptions (#939)fix/raise-from
Diffstat (limited to 'gitlab/config.py')
| -rw-r--r-- | gitlab/config.py | 8 |
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: |
