Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #1062/156bca93 backport][0.27] Fix stray click import in pulp-glue #1064

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pulp-glue/pulp_glue/common/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,16 @@ def echo(self, message: str, nl: bool = True, err: bool = False) -> None:
Abstract function that will be called to emit warnings and task progress.

Warning:
This function needs to be implemented.
This function does nothing until implemented by a subclass.
"""
raise NotImplementedError("PulpContext is an abstract class.")

def prompt(self, text: str, hide_input: bool = False) -> str:
"""
Abstract function that will be called to ask for a password interactively.

Note:
If a password is provided non-interactively, this function need not be implemented.
Doing so is deprecated.
"""
raise NotImplementedError("PulpContext is an abstract class.")

Expand Down
4 changes: 1 addition & 3 deletions pulp-glue/pulp_glue/rpm/context.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import typing as t

import click

from pulp_glue.common.context import (
EntityDefinition,
PluginRequirement,
Expand Down Expand Up @@ -70,7 +68,7 @@ class PulpRpmCompsXmlContext(PulpEntityContext):
def upload_comps(
self, file: t.IO[bytes], repo_href: t.Optional[str], replace: t.Optional[bool]
) -> t.Any:
click.echo(_("Uploading file {filename}").format(filename=file.name), err=True)
self.pulp_ctx.echo(_("Uploading file {filename}").format(filename=file.name), err=True)
file.seek(0)
return self.call(
"upload_comps",
Expand Down
Loading