From 3badcfa36793360f96b149c1b17a5a4a6ab01150 Mon Sep 17 00:00:00 2001 From: Fabien-B Date: Mon, 20 Feb 2023 22:43:44 +0100 Subject: [PATCH] [supervision] Fix session save programs. (#2999) Arguments like "-ac a b" was previously parsed as "-ac b". --- sw/supervision/python/session_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/supervision/python/session_widget.py b/sw/supervision/python/session_widget.py index a955e39bfe..2bd2c55e23 100644 --- a/sw/supervision/python/session_widget.py +++ b/sw/supervision/python/session_widget.py @@ -281,8 +281,8 @@ class SessionWidget(QWidget, Ui_Session): arg = Arg(param, None) args.append(arg) else: - if arg is not None and arg.flag.startswith("-"): - # if it don't starts with -, but the previous did, fill the constant + if arg is not None and arg.flag.startswith("-") and arg.constant is None: + # if it don't starts with -, but the previous did, and the constant is not yet filled, fill the constant arg.constant = param else: # if it don't starts with -, nor the previous, its probably a mandatory argument