From 626c3f9bc952e3ef910734e3320238b263fd1af2 Mon Sep 17 00:00:00 2001 From: Mizev Andrew <150728785+carpalsgrabby@users.noreply.github.com> Date: Tue, 25 Nov 2025 09:51:31 +0100 Subject: [PATCH] Validate --leaves > 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Negative or zero leaves don’t make sense. --- sweep_layouts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sweep_layouts.py b/sweep_layouts.py index 159ea49..473dda9 100644 --- a/sweep_layouts.py +++ b/sweep_layouts.py @@ -131,7 +131,9 @@ def run_app( def main() -> None: args = parse_args() - +if args.leaves <= 0: + print("ERROR: --leaves must be > 0.", file=sys.stderr) + sys.exit(1) app_path = Path(args.app_path) if not app_path.is_file(): print(f"ERROR: app.py not found at {app_path}", file=sys.stderr)