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

Merge pull request #358 from anzzyspeaksgit/fix/issue-356

fix: make SBY config parsing error messages less ambiguous
This commit is contained in:
Gus Smith 2026-03-30 12:31:42 -04:00 committed by GitHub
commit 6424d15aae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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

@ -1374,7 +1374,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"]