Skip to content

Commit d7c69d3

Browse files
committed
Fix issue when there is no steps section in chipflow.toml
1 parent 85efd15 commit d7c69d3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

chipflow_lib/cli.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,16 @@ def run(argv=sys.argv[1:]):
3737

3838
if config.chipflow.steps:
3939
steps = DEFAULT_STEPS |config.chipflow.steps
40-
for step_name, step_reference in steps.items():
41-
step_cls = _get_cls_by_reference(step_reference, context=f"step `{step_name}`")
42-
try:
43-
commands[step_name] = step_cls(config)
44-
except Exception:
45-
raise ChipFlowError(f"Encountered error while initializing step `{step_name}` "
46-
f"using `{step_reference}`")
40+
else:
41+
steps = DEFAULT_STEPS
42+
43+
for step_name, step_reference in steps.items():
44+
step_cls = _get_cls_by_reference(step_reference, context=f"step `{step_name}`")
45+
try:
46+
commands[step_name] = step_cls(config)
47+
except Exception:
48+
raise ChipFlowError(f"Encountered error while initializing step `{step_name}` "
49+
f"using `{step_reference}`")
4750

4851
parser = argparse.ArgumentParser(
4952
prog="chipflow",

0 commit comments

Comments
 (0)