Skip to content

Commit

Permalink
remove exception handling for FileNotFoundError
Browse files Browse the repository at this point in the history
This exception is handled within the RootCommand object, so the
exception will never bubble up.
  • Loading branch information
ephur committed May 25, 2024
1 parent 7cdaecd commit 0f87a5d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tfworker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,7 @@ def cli(context, **kwargs):
validate_host()
validate_working_dir(kwargs.get("working_dir", None))
config_file = kwargs["config_file"]
try:
context.obj = RootCommand(args=kwargs)
except FileNotFoundError:
click.secho(f"configuration file {config_file} not found", fg="red", err=True)
raise SystemExit(1)
context.obj = RootCommand(args=kwargs)


@cli.command()
Expand Down

0 comments on commit 0f87a5d

Please sign in to comment.