diff --git a/fsl/wrappers/wrapperutils.py b/fsl/wrappers/wrapperutils.py index 39339e18fd86c2957f60c3ae906d0441186aa7fb..a4ed4d4a7c755b8fbe79c5f2b90592ea6c36e7bc 100644 --- a/fsl/wrappers/wrapperutils.py +++ b/fsl/wrappers/wrapperutils.py @@ -299,11 +299,12 @@ def applyArgStyle(style, valsep=None, argmap=None, valmap=None, singlechar_args= for k, v in kwargs.items(): + if v is None: continue + k = argmap.get(k, k) mapv = valmap.get(k, fmtval(v)) k = fmtarg(k) - if mapv in (SHOW_IF_TRUE, HIDE_IF_TRUE): if (mapv is SHOW_IF_TRUE and v) or \ (mapv is HIDE_IF_TRUE and not v): @@ -621,6 +622,7 @@ class _FileOrThing(object): val = allargs.get(name, None) if val is None: + allargs.pop(name, None) continue if val is LOAD: