diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-06-01 00:38:07 +0200 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-06-01 08:00:51 -0700 |
commit | 98ccc3c2622a3cdb24797fd8790e921f5f2c1e6a (patch) | |
tree | 95e82bf184c0e4d6fe837297e2664abe2c6c9777 | |
parent | 5d1486785793b02038ac6f527219801744ee888b (diff) | |
download | gitlab-98ccc3c2622a3cdb24797fd8790e921f5f2c1e6a.tar.gz |
chore(cli): ignore coverage on exceptions triggering cli.die
-rw-r--r-- | gitlab/v4/cli.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py index bd6a6a4..b396e46 100644 --- a/gitlab/v4/cli.py +++ b/gitlab/v4/cli.py @@ -125,7 +125,7 @@ class GitlabCLI: assert data is not None sys.stdout.buffer.write(data) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to download the export", e) def do_create(self) -> gitlab.base.RESTObject: @@ -133,7 +133,7 @@ class GitlabCLI: assert isinstance(self.mgr, gitlab.mixins.CreateMixin) try: result = self.mgr.create(self.args) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to create object", e) return result @@ -144,7 +144,7 @@ class GitlabCLI: assert isinstance(self.mgr, gitlab.mixins.ListMixin) try: result = self.mgr.list(**self.args) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to list objects", e) return result @@ -152,7 +152,7 @@ class GitlabCLI: if isinstance(self.mgr, gitlab.mixins.GetWithoutIdMixin): try: result = self.mgr.get(id=None, **self.args) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to get object", e) return result @@ -163,7 +163,7 @@ class GitlabCLI: id = self.args.pop(self.cls._id_attr) try: result = self.mgr.get(id, lazy=False, **self.args) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to get object", e) return result @@ -174,7 +174,7 @@ class GitlabCLI: id = self.args.pop(self.cls._id_attr) try: self.mgr.delete(id, **self.args) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to destroy object", e) def do_update(self) -> Dict[str, Any]: @@ -189,7 +189,7 @@ class GitlabCLI: try: result = self.mgr.update(id, self.args) - except Exception as e: + except Exception as e: # pragma: no cover, cli.die is unit-tested cli.die("Impossible to update object", e) return result |