Skip to content

Commit

Permalink
Unify error and warning messages, use a URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Karetnikov committed Nov 22, 2023
1 parent a560d1f commit a566e7d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ def action_generate_conda_docker(
output_image_name: str,
output_image_tag: str,
):
# Upstream issue in conda-docker, see
# https://github.com/conda-incubator/conda-store/issues/666
raise RuntimeError("Generating Docker images is currently not supported, see #666")
raise RuntimeError(
"Generating Docker images is currently not supported, see "
"https://github.com/conda-incubator/conda-store/issues/666"
)

# Import is inside the function because conda_docker is only available on
# Linux
Expand Down
7 changes: 4 additions & 3 deletions conda-store-server/conda_store_server/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,12 @@ def build_conda_pack(db: Session, conda_store, build: orm.Build):


def build_conda_docker(db: Session, conda_store, build: orm.Build):
# Upstream issue in conda-docker, see
# https://github.com/conda-incubator/conda-store/issues/666
import warnings

warnings.warn("Generating Docker images is currently not supported, see #666")
warnings.warn(
"Generating Docker images is currently not supported, see "
"https://github.com/conda-incubator/conda-store/issues/666"
)
return

conda_prefix = build.build_path(conda_store)
Expand Down
2 changes: 1 addition & 1 deletion conda-store-server/tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_generate_conda_pack(tmp_path, conda_prefix):


@pytest.mark.xfail(reason=(
"upstream issue in conda-docker, see "
"Generating Docker images is currently not supported, see "
"https://github.com/conda-incubator/conda-store/issues/666"))
def test_generate_conda_docker(conda_store, conda_prefix):
action.action_generate_conda_docker(
Expand Down

0 comments on commit a566e7d

Please sign in to comment.