Skip to content

Commit

Permalink
Merge pull request #68 from padovan/use-kci-err
Browse files Browse the repository at this point in the history
msg: use kci_err for error messages in main.py
  • Loading branch information
aliceinwire authored Dec 18, 2024
2 parents 372b9e5 + ee110ed commit a7ce0db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions kcidev/libs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ def load_toml(settings):
config = toml.load(f)

if not config:
click.secho(
f"No `{fname}` configuration file found at `{global_path}`, `{user_path}` or `{settings}`",
fg="red",
kci_err(
f"No `{fname}` configuration file found at `{global_path}`, `{user_path}` or `{settings}`"
)
raise click.Abort()

Expand Down
6 changes: 2 additions & 4 deletions kcidev/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ def cli(ctx, settings, instance):
else:
ctx.obj["INSTANCE"] = ctx.obj["CFG"].get("default_instance")
if not ctx.obj["INSTANCE"]:
click.secho("No instance defined in settings or as argument", fg="red")
kci_err("No instance defined in settings or as argument")
raise click.Abort()
if ctx.obj["INSTANCE"] not in ctx.obj["CFG"]:
click.secho(
f"Instance {ctx.obj['INSTANCE']} not found in {settings}", fg="red"
)
kci_err(f"Instance {ctx.obj['INSTANCE']} not found in {settings}")
raise click.Abort()
pass

Expand Down

0 comments on commit a7ce0db

Please sign in to comment.