diff options
author | John L. Villalovos <john@sodarock.com> | 2022-05-29 17:12:40 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-05-29 17:12:40 -0700 |
commit | 0b7933c5632c2f81c89f9a97e814badf65d1eb38 (patch) | |
tree | 087c06c87f2dadef60447a249ee66d41daed5b87 /gitlab/cli.py | |
parent | f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 (diff) | |
download | gitlab-0b7933c5632c2f81c89f9a97e814badf65d1eb38.tar.gz |
chore: correct ModuleNotFoundError() arguments
Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had
used the `name` argument for `ModuleNotFoundError()`. This basically
is the equivalent of not passing any message to
`ModuleNotFoundError()`. So when the exception was raised it wasn't
very helpful.
Correct that and add a unit-test that shows we get the message we
expect.
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index cad6b6f..4159632 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -301,7 +301,7 @@ def main() -> None: sys.exit(e) # We only support v4 API at this time if config.api_version not in ("4",): # dead code # pragma: no cover - raise ModuleNotFoundError(name=f"gitlab.v{config.api_version}.cli") + raise ModuleNotFoundError(f"gitlab.v{config.api_version}.cli") # Now we build the entire set of subcommands and do the complete parsing parser = _get_parser() |