From 8e37ec13bf70da6d20030920c980f2d0f0bf55d9 Mon Sep 17 00:00:00 2001 From: anzzyspeaksgit Date: Mon, 23 Mar 2026 02:02:53 +0000 Subject: [PATCH] fix: make SBY config parsing error messages less ambiguous Closes #356 --- sbysrc/sby.py | 2 +- sbysrc/sby_core.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sbysrc/sby.py b/sbysrc/sby.py index 2d5a1da..a72b098 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -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 diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index 7a67cd3..3cb9d27 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -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"]