Skip to content

Commit

Permalink
Fixed crashing pulp domain
Browse files Browse the repository at this point in the history
Providing a default value for --domain lead to the domain subcommand
group getting an invalid default_map.

fixes #769

(cherry picked from commit aa48741)
  • Loading branch information
mdellweg committed Aug 11, 2023
1 parent 36a6df3 commit 53c0ea3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/769.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a crash in `pulp domain` when a default value for `--domain` was provided in the config file.
4 changes: 3 additions & 1 deletion pulpcore/cli/core/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
_ = translation.gettext


@pulp_group()
# We need to override the default_map, because we may read a default value for the `--domain`
# option from the config file that will collide here.
@pulp_group(name="domain", context_settings={"default_map": {}})
@pass_pulp_context
@click.pass_context
def domain(ctx: click.Context, pulp_ctx: PulpContext) -> None:
Expand Down

0 comments on commit 53c0ea3

Please sign in to comment.