[supervision] Fix session save programs. (#2999)

Arguments like "-ac a b" was previously parsed as "-ac b".
This commit is contained in:
Fabien-B
2023-02-20 22:43:44 +01:00
committed by GitHub
parent 2bb87eb026
commit 3badcfa367
+2 -2
View File
@@ -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