3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2026-03-29 19:25:50 +00:00

fix: make SBY config parsing error messages less ambiguous

Closes #356
This commit is contained in:
anzzyspeaksgit 2026-03-23 02:02:53 +00:00
parent 268502844e
commit 8e37ec13bf
2 changed files with 4 additions and 2 deletions

View file

@ -215,7 +215,7 @@ def read_sbyconfig(sbydata, taskname):
tasks_section = False
if task_skiping_blocks:
if line == "--":
if line.strip() == "--":
task_skip_block = False
task_skiping_blocks = False
return

View file

@ -1373,7 +1373,9 @@ class SbyTask(SbyConfig):
self.handle_str_option("mode", None)
if self.opt_mode not in ["bmc", "prove", "cover", "live", "prep"]:
if self.opt_mode is None:
self.error("Missing mode. Please specify a `mode` in the [options] section.")
elif self.opt_mode not in ["bmc", "prove", "cover", "live", "prep"]:
self.error(f"Invalid mode: {self.opt_mode}")
self.expect = ["PASS"]