Skip to content

Commit 335e2f0

Browse files
🐛 Stop logging a success init message when init fails (#336)
1 parent 27aeb3e commit 335e2f0

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixed
66

77
- :bug: Make ``pipeline_ml_factory`` now correctly uses ``kpm_kwargs`` and ``log_model_kwargs`` instead of always using the default values. ([#329](https://github.com/Galileo-Galilei/kedro-mlflow/issues/329))
8+
- :bug: ``kedro mlflow init`` command no longer raises both a success and an error message when the command is failing. ([#336](https://github.com/Galileo-Galilei/kedro-mlflow/issues/336))
89

910
### Changed
1011

kedro_mlflow/framework/cli/cli.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,20 @@ def init(env: str, force: bool, silent: bool):
106106
dst=mlflow_yml_path,
107107
python_package=project_metadata.package_name,
108108
)
109+
if not silent:
110+
click.secho(
111+
click.style(
112+
f"'{settings.CONF_SOURCE}/{env}/{mlflow_yml}' successfully updated.",
113+
fg="green",
114+
)
115+
)
109116
except FileNotFoundError:
110117
click.secho(
111118
click.style(
112119
f"No env '{env}' found. Please check this folder exists inside '{settings.CONF_SOURCE}' folder.",
113120
fg="red",
114121
)
115122
)
116-
if not silent:
117-
click.secho(
118-
click.style(
119-
f"'{settings.CONF_SOURCE}/{env}/{mlflow_yml}' successfully updated.",
120-
fg="green",
121-
)
122-
)
123123

124124

125125
@mlflow_commands.command()

0 commit comments

Comments
 (0)